Created
January 22, 2018 08:29
-
-
Save nuriel77/8758f2f6722968d20a6f81f75daecbbf to your computer and use it in GitHub Desktop.
Install oracle java manually on ubuntu/debian
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
# Run curl to get the oracle package: | |
curl -H 'Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie' -LO http://download.oracle.com/otn-pub/java/jdk/8u162-b12/0da788060d494f5095bf8624735fa2f1/jdk-8u162-linux-x64.tar.gz | |
# mkdir in /opt and untar it | |
mkdir -p /opt/jdk && tar -zxvf jdk-8u162-linux-x64.tar.gz -C /opt/jdk/ | |
# Link executables: | |
update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_162/bin/java 100 | |
update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.8.0_162/bin/javac 100 | |
# Verify the links: | |
update-alternatives --display java | |
update-alternatives --display javac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment