Last active
December 17, 2015 21:49
-
-
Save svzdvd/5677679 to your computer and use it in GitHub Desktop.
Oracle JDK 7 installation on Ubuntu
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
wget --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.tar.gz" | |
tar xzf jdk-7u51-linux-x64.tar.gz | |
sudo mv jdk1.7.0_51 /usr/lib/jvm/ | |
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0_51/bin/java" 1 | |
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0_51/bin/javac" 1 | |
# interactive selection | |
sudo update-alternatives --config java | |
# interactive selection | |
sudo update-alternatives --config javac | |
# test | |
java -version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment