Configure Alternate Java in RHEL 8

To view the list of all installed Java versions run:

$ update-alternatives --config java
There are 2 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
   1           java-11-openjdk.x86_64 (/usr/lib/jvm/java-11-openjdk-11.0.6.10-4.el8.x86_64/bin/java)
*+ 2           java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-4.el8.x86_64/jre/bin/java)

Enter to keep the current selection[+], or type selection number: 1

You will be prompted to enter a selection number. To change the selection from selection #2 (JDK 1.8) to selection #1 (JDK 11), give 1.

Now view the details of installed java versions again and make sure the correct version of JDK is highlighted with a * near the selection number.  

Asha

Asha

I am a self mentored web enthusiast who likes to inspect element everything I see on the web.