Created
June 28, 2014 14:46
-
-
Save bdiegel/f5d0e054583e0c7a49c6 to your computer and use it in GitHub Desktop.
Install JDK 1.7 on Linux (Ubuntu 14.04)
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 tar -xzvf ~/Downloads/jdk-7u60-linux-x64.tar.gz | |
sudo mkdir -p /usr/lib/jvm | |
sudo mv ./jdk1.7.0_60/ /usr/lib/jvm/ | |
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0_60/bin/java" 1 | |
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0_60/bin/javac" 1 | |
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0_60/bin/javaws" 1 | |
sudo chmod a+x /usr/bin/java | |
sudo chmod a+x /usr/bin/javac | |
sudo chmod a+x /usr/bin/javaws | |
sudo chown -R root:root /usr/lib/jvm/jdk1.7.0_60/ | |
sudo update-alternatives --config java | |
sudo update-alternatives --config javac | |
sudo update-alternatives --config javaws |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment