Last active
January 8, 2016 16:45
-
-
Save zunman/b2a2725d9ee26f6d1d74 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
$ cd /opt/ | |
$ sudo 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 | |
$ sudo tar xzf jdk-7u79-linux-x64.tar.gz | |
$ cd /opt/jdk1.7.0_79/ | |
$ sudo alternatives --install /usr/bin/java java /opt/jdk1.7.0_79/bin/java 2 | |
$ sudo alternatives --config java | |
//[select /opt/jdk1.7.0_79/bin/java] | |
$ sudo alternatives --install /usr/bin/jar jar /opt/jdk1.7.0_79/bin/jar 2 | |
$ sudo alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_79/bin/javac 2 | |
$ sudo alternatives --set jar /opt/jdk1.7.0_79/bin/jar | |
$ sudo alternatives --set javac /opt/jdk1.7.0_79/bin/javac | |
$ java –version | |
$ export JAVA_HOME=/opt/jdk1.7.0_79 | |
$ export JRE_HOME=/opt/jdk1.7.0_79/jre | |
$ export PATH=$PATH:/opt/jdk1.7.0_79/bin:/opt/jdk1.7.0_79/jre/bin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment