Skip to content

Instantly share code, notes, and snippets.

@facholi
Created February 27, 2015 17:46
Show Gist options
  • Save facholi/bd0654713116aa09710b to your computer and use it in GitHub Desktop.
Save facholi/bd0654713116aa09710b to your computer and use it in GitHub Desktop.
Procedure for installing and setting Oracle JDK Java on Amazon EC2
# get the latest jdk version
wget -c --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u31-b13/jdk-8u31-linux-x64.rpm"
# install it
sudo rpm -i jdk-8u31-linux-x64.rpm
# create the alternative
sudo alternatives --install /usr/bin/java java /usr/java/default/bin/java 20000
# configure the alternative
sudo alternatives --config java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment