change java default version linux code example
Example 1: check java version linux
//1.6 and higher versions
java -version
Example 2: changer version java terminal
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
//1.6 and higher versions
java -version
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`