Multiple version of java in Linux with alternatives

Download the required jdk # cd /usr/java/ # wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz" # tar xzf jdk-7u79-linux-x64.tar.gz 2. Install java with Alternatives # cd /usr/java # alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_79/bin/java 2 # alternatives --config java There are 3 programs which provide 'java'. Selection Command ----------------------------------------------- * 1 /opt/jdk1.7.0_60/bin/java + 2 /opt/jdk1.7.0_72/bin/java … Continue reading Multiple version of java in Linux with alternatives

Advertisements