Last active
April 23, 2016 12:33
-
-
Save RishikeshDarandale/287fcc28fc678919beaf to your computer and use it in GitHub Desktop.
Installation steps for oracle java on uBuntu
This file contains hidden or 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
# Remove any installation of openjdk | |
$ sudo apt-get purge openjdl-\* | |
# Create a 'java' directory under /usr/local | |
$ sudo mkdir /usr/local/java | |
$ cd /usr/local/java | |
# Copy the installable to /usr/local/java | |
$ sudo cp ~/Downloads/jdk-8u65-linux-x64.tar.gz . | |
# Extract it | |
$ sudo tar -xvzf jdk-8u65-linux-x64.tar.gz | |
# Create asymlink to installation for quick upgrade to next version | |
$ sudo ln -s jdk1.8.0_65 latest | |
# Inform your Ubuntu Linux system where your Oracle Java JDK/JRE is located. | |
$ sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/latest/bin/java" 1 | |
$ sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/java/latest/bin/javac" 1 | |
$ sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/local/java/latest/bin/javaws" 1 | |
# Inform your Ubuntu Linux system that Oracle Java JDK/JRE must be the default Java. | |
$ sudo update-alternatives --set java /usr/local/java/latest/bin/java | |
$ sudo update-alternatives --set javac /usr/local/java/latest/bin/javac | |
$ sudo update-alternatives --set javaws /usr/local/java/latest/bin/javaws |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment