Skip to content

Instantly share code, notes, and snippets.

@svzdvd
Last active December 17, 2015 21:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save svzdvd/5677679 to your computer and use it in GitHub Desktop.
Save svzdvd/5677679 to your computer and use it in GitHub Desktop.
Oracle JDK 7 installation on Ubuntu
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