Last active
February 18, 2017 16:49
-
-
Save adgon92/e8c6cfb2bd2a6ff24c66b69452ccb122 to your computer and use it in GitHub Desktop.
Install java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u5-b13/jdk-8u5-linux-x64.tar.gz | |
sudo mkdir /opt/jdk | |
tar -zxf jdk-8u5-linux-x64.tar.gz -C /opt/jdk | |
ls /opt/jdk | |
update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_05/bin/java 100 | |
update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.8.0_05/bin/javac 100 | |
java -version | |
update-alternatives --install /usr/bin/java java /opt/jdk/jdk.new.version/bin/java 110 | |
update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk.new.version/bin/javac 110 | |
# update-alternatives --remove java /opt/jdk/jdk.old.version/bin/java | |
# update-alternatives --remove javac /opt/jdk/jdk.old.version/bin/javac | |
# rm -rf /opt/jdk/jdk.old.version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment