Skip to content

Instantly share code, notes, and snippets.

@lelayf
Forked from tankchintan/gist:1335220
Created February 28, 2012 05:34
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save lelayf/1929949 to your computer and use it in GitHub Desktop.
Save lelayf/1929949 to your computer and use it in GitHub Desktop.
Procedure for installing and setting Sun JDK Java 6 on Amazon Linux AMI 64bit
# Get latest Sun Java SDK in v6 from Oracle
wget http://download.oracle.com/otn-pub/java/jdk/6u31-b04/jdk-6u31-linux-x64-rpm.bin
# make it exec
chmod +x jdk-6u31-linux-x64-rpm.bin
# Install Java
sudo ./jdk-6u31-linux-x64-rpm.bin
# Check if the default java version is set to sun jdk
# Normally it says OpenJDK
java -version
# Lets create one more alternative for Java for Sun JDK
sudo /usr/sbin/alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_31/bin/java 20000
# Set the SUN JDK as the default java
sudo /usr/sbin/alternatives --config java
# Verify if change in SDK was done.
java -version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment