Skip to content

Instantly share code, notes, and snippets.

@nuriel77
Created January 22, 2018 08:29
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 nuriel77/8758f2f6722968d20a6f81f75daecbbf to your computer and use it in GitHub Desktop.
Save nuriel77/8758f2f6722968d20a6f81f75daecbbf to your computer and use it in GitHub Desktop.
Install oracle java manually on ubuntu/debian
# 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