How to install and switch between multi JDK?
How to install and switch between multi JDK? Table of Contents How to install and switch between multi JDK? Linux Mac OS X Common incompatible errors between different version 1 How to install and switch between multi JDK? I suppose that you are installed both java 7 and 8 into your system. So how to switch between them. 1.1 Linux # !/bin/ bash # java1.7.sh # source java1.7.sh to switch jdk 1.7 export JAVA_HOME = "/opt/tools/jdk1.7.0_60" export CLASSPATH =.:${ JAVA_HOME }/lib:${ CLASSPATH } export JDK_HOME = "/opt/tools/jdk1.7.0_60" export PATH = "/opt/tools/jdk1.7.0_60/bin" :${ PATH } # !/bin/ bash # source java1.8.sh to switch to JDK 1.8 export JAVA_HOME = "/opt/tools/jdk1.8.0_05" export CLASSPATH =.:${ JAVA_HOME }/lib:${ CLASSPATH } export JDK_HOME = "/opt/tools/jdk1.8.0_05" export PATH = "/opt/tools/jdk1.8.0_05/bin" :${ PATH } 1.2 Mac OS X # ~/.bash_profile ...