When I type for java -version in command prompt in ubuntu I get following output
The program 'java' can be found in the following packages: * default-jre * gcj-4.8-jre-headless * openjdk-7-jre-headless * gcj-4.6-jre-headless * openjdk-6-jre-headless Try: apt-get install <selected package>
I get above output as I do not have java install. I want to know difference between openjdk-7-jre-headless and openjdk-7-jre
Headless is the same version than the latter without the support of keyboard, mouse and display systems. Hence it has less dependencies for runtime (no all Xorg display packages chain …) and it makes it more suitable for server applications.
OpenJDK Development Kit (JDK) (headless) OpenJDK is a development environment for building applications, applets, and components using the Java programming language.
Standard Java or Java compatible Development Kit (headless) This dependency package points to the Java runtime, or Java compatible development kit recommended for this architecture, which is openjdk-8-jdk-headless for amd64. The package is used as dependency for packages not needing a graphical display during runtime.
The openjdk-7-jre-headless package is used when you don't need to draw anything in the graphical user interface. For example a background service or a terminal application. It's commonly used on servers. The openjdk-7-jre package includes the openjdk-7-jre-headless package since it contains most of the Java features.
To quote debian's wiki:
There are several virtual packages used in Debian for Java. These cover runtime compatibility and come in two flavours; headless (omits graphical interfaces) and normal.
Or to be more exact, consider this description from Oracle:
Headless mode is a system configuration in which the display device, keyboard, or mouse is lacking. Sounds unexpected, but actually you can perform different operations in this mode, even with graphic data.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With