Skip to content

Instantly share code, notes, and snippets.

@ralph-tice
Last active October 13, 2015 20:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save ralph-tice/4252866 to your computer and use it in GitHub Desktop.
Save ralph-tice/4252866 to your computer and use it in GitHub Desktop.
swapping out OpenJDK for Oracle JDK on Amazon EC2
#download the JDK
#oracle's rpm.bin gets pulled down as corrupt..zzz
#wget --no-cookies --header "Cookie: gpw_e24=xxx" "http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-x64-rpm.bin" -O jdk-7-linux-x64-rpm.bin
#updated for version 7u11
wget --no-cookies --header "Cookie: gpw_e24=xxx" http://download.oracle.com/otn-pub/java/jdk/7u11-b21/jdk-7u11-linux-x64.rpm -O jdk-7u11-linux-x64.rpm
sudo rpm -ivh jdk-7u11-linux-x64.rpm
sudo alternatives --install /usr/bin/java java /usr/java/default/bin/java 20000
sudo update-alternatives --config java
sudo ln -s /usr/java/default/jre /usr/lib/jvm/jre
sudo ln -s /usr/share/java /usr/lib/jvm-exports/jre
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment