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
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.