How to update the Java version on Linux?


After you install the new version of Java on Linux, please reset the Environment Variables
by adding the following lines at the end of /etc/profile file:

CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
PATH=$PATH:$JAVA_HOME/bin
export JAVA_HOME CLASSPATH
PATH


Please perform the command "source /etc/profile" after saving
the /etc/profile file. You can test if the new setting takes effect by
"java -version" command.