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-
*+ 2           java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-

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.  



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