Created
April 24, 2017 21:13
-
-
Save iarrup/4f472b84a6327aac142d70b024d9785a to your computer and use it in GitHub Desktop.
This file contains 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
#Download 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/8u121-b13/e9e7ea248e2c4826b92b3f075a80e441/jdk-8u121-linux-x64.tar.gz" | |
sudo mv jdk-8u121-linux-x64.tar.gz /opt/ | |
sudo tar xvfz jdk-8u121-linux-x64.tar.gz | |
#Setup alternatives | |
cd /opt/jdk1.8.0_121/ | |
alternatives --install /usr/bin/java java /opt/jdk1.8.0_121/bin/java 2 | |
alternatives --config java | |
#select the right option | |
# Setup alternatives for javac and jar | |
alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_121/bin/javac 2 | |
alternatives --install /usr/bin/jar jar /opt/jdk1.8.0_121/bin/jar 2 | |
alternatives --set jar /opt/jdk1.8.0_121/bin/jar | |
alternatives --set javac /opt/jdk1.8.0_121/bin/javac | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment