
There are 2 choices for the alternative java (providing /usr/bin/java). You can verify this here: update-alternatives -display javaĬheck which Java versions are already installed on my system with yum: apt list -installed | grep openjdk
#Java 11 openjdk manual#
It will change the mechanism from auto to manual and gives you more control which default Java environment is used on your system. To prevent this behavior, run the update-alternative -config java tool and set it manually, even you have just one JDK installed. This can cause weird behavior when you restart running Java applications and can get you in some unnecessary trouble.
#Java 11 openjdk install#
As soon as you install OpenJDK 1.8.0 it will change your system to use this as your new default because it is set as auto selection by default. This means if you just install OpenJDK 11 it will be your default JDK. For CentOS 7 by default tells you OpenJDK 1.8.0 is the best-suited version for your system. By default you will see java - status is auto. The first output line of the update-alternatives -display java shows you the default setting and how it is selected. Test if the Java compiler is set to the same version you’ve selected: javac -version OpenJDK 64-Bit Server VM 18.9 (build 11.0.3+7-LTS, mixed mode, sharing) OpenJDK Runtime Environment 18.9 (build 11.0.3+7-LTS) Test if the Java Runtime Environment is the version you’ve selected: java -version There are 3 programs which provide 'java'. Set the java-11-openjdk.x86_64 as your selected by type 3. The * is what the distribution to prefer as the “best version” and the + tells you what is selected. Set a default version update-alternatives -config java


The update-alternatives tool shows which version is currently used as default: update-alternatives -display java For OpenNMS Horizon it is required to have OpenJDK Development Kit installed which is named java-11-openjdk-devel on CentOS and on Ubuntu openjdk-11-jdk.Ĭheck which Java versions are already installed on my system with yum: yum list installed | grep java
