In this article, you will see how to change default java version to latest version.
Check the current version used on your system.
gij (GNU libgc) version 4.1.2 2008704 (Red Hat 1.4.2-48)
If there are multiple versions of java, you can change the default version by executing following command. It will also display which is default version used by your machine (indicated by *).
There are 2 programs which provide ‘java’.
*+ 1 /usr/java/jdk1.4.2/jre/bin/java
Enter to keep the current selection[+], or type selection number : 2
Now again check the current version used on your system.