Skip to content

Instantly share code, notes, and snippets.

@james-m
Forked from lelayf/gist:1929949
Created February 28, 2014 00:36
Show Gist options
  • Save james-m/9262814 to your computer and use it in GitHub Desktop.
Save james-m/9262814 to your computer and use it in GitHub Desktop.
# 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