Child pages
  • Java Environment

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Anchor
Environment
Environment
Environment

Anchor
NoJVM
NoJVM
No JVM

On a machine without any defined java, it will look like this. The update-alternatives doesn't display any defined alternatives:

Code Block
languagebash
themeEmacs
user@machine:~$ update-alternatives --get-selections | grep java

...


lucli auto /usr/lib/liblucene2-java/lucli

user@machine:~$ java -version
The program 'java' can be found in the following packages:
* default-jre
* If you try to run java, it doesn't run successfully:

Code Block
languagebash
themeEmacs
user@machine:~$ java -version
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: sudo apt-get install <selected

...

 package>

The next test will be to use the update-java-alternatives command, to check if we have some installed JVM:

Code Block
languagebash
user@machine:~$ sudo update-java-alternatives -l
default-java 1073 /usr/lib/jvm/default-java
java-1.8.0-openjdk-i386 1069 /usr/lib/jvm/java-1.8.0-openjdk-i386
java-8-openjdk-i386 1069 /usr/lib/jvm/java-8-openjdk-i386
java-8-oracle 1070 /usr/lib/jvm/java-8-oracle
ramdisk-java-8-oracle 1073 /usr/lib/jvm/ramdisk-java-8-oracle

Anchor
CurrentJVM
CurrentJVM
Current JVM

...