To add to previous answers the normal java depends on the headless and install some extra packages.
I tried to compare dependencies of:
- java-1.8.0-openjdk-headless-1.8.0.191.b12-0.el7_5.x86_64
- java-1.8.0-openjdk-1.8.0.191.b12-0.el7_5.x86_64
The comparison done with yum install
on Centos 7.6
The normal Java (in contrast to headless) installed following extras:
=============================|========|=========================|============|=======|=================|
Package | Arch | Version | Repository | Size | Vulnerabilities |
=============================|========|=========================|============|=======|=================|
alsa-lib | x86_64 | 1.1.6-2.el7 | centos_7.6 | 424 k | 1 | 2005 |
dejavu-fonts-common | noarch | 2.33-6.el7 | centos_7.6 | 64 k | - | |
dejavu-sans-fonts | noarch | 2.33-6.el7 | centos_7.6 | 1.4 M | - | |
fontconfig | x86_64 | 2.13.0-4.3.el7 | centos_7.6 | 254 k | 1 | 2016 |
fontpackages-filesystem | noarch | 1.44-8.el7 | centos_7.6 | 9.9 k | - | |
giflib | x86_64 | 4.1.6-9.el7 | centos_7.6 | 40 k | 5 | 2018 |
java-1.8.0-openjdk-headless | x86_64 | 1:1.8.0.191.b12-0.el7_5 | centos_7.6 | 32 M | ? | |
libICE | x86_64 | 1.0.9-9.el7 | centos_7.6 | 66 k | 1 | 2018 |
libSM | x86_64 | 1.2.2-2.el7 | centos_7.6 | 39 k | - | |
libX11 | x86_64 | 1.6.5-2.el7 | centos_7.6 | 606 k | 3 | 2013 |
libX11-common | noarch | 1.6.5-2.el7 | centos_7.6 | 164 k | | |
libXau | x86_64 | 1.0.8-2.1.el7 | centos_7.6 | 29 k | | |
libXcomposite | x86_64 | 0.4.4-4.1.el7 | centos_7.6 | 22 k | | |
libXext | x86_64 | 1.3.3-3.el7 | centos_7.6 | 39 k | | |
libXi | x86_64 | 1.7.9-1.el7 | centos_7.6 | 40 k | | |
libXrender | x86_64 | 0.9.10-1.el7 | centos_7.6 | 26 k | | |
libXtst | x86_64 | 1.2.3-1.el7 | centos_7.6 | 20 k | | |
libfontenc | x86_64 | 1.1.3-3.el7 | centos_7.6 | 31 k | | |
libxcb | x86_64 | 1.13-1.el7 | centos_7.6 | 214 k | | |
ttmkfdir | x86_64 | 3.0.9-42.el7 | centos_7.6 | 48 k | - | |
xorg-x11-font-utils | x86_64 | 1:7.5-21.el7 | centos_7.6 | 104 k | 1 | 2008 |
xorg-x11-fonts-Type1 | noarch | 7.5-9.el7 | centos_7.6 | 521 k | | |
=============================|========|=========================|============|=======|=================|
Note that java-1.8.0-openjdk-headless is a dependency of java-1.8.0-openjdk.
Also note that the concrete dependencies may differ on your system.