Skip to content

Instantly share code, notes, and snippets.

  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save prasathsivasubramaniyan/590de9df54219e47099715ff81f33472 to your computer and use it in GitHub Desktop.
Install Oracle JDK on Ubuntu
#!/bin/bash
JDK_URL=http://download.oracle.com/otn-pub/java/jdk/8u74-b02/jdk-8u74-linux-x64.tar.gz
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" $JDK_URL
sudo mkdir -p /opt/jdk
sudo tar -zxf jdk-8u74-linux-x64.tar.gz -C /opt/jdk
sudo update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_74/bin/java 100
rm jdk-8u74-linux-x64.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment