Skip to content

Instantly share code, notes, and snippets.

@dopplesoldner
Forked from lelayf/gist:1929949
Created March 17, 2014 16:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dopplesoldner/9602502 to your computer and use it in GitHub Desktop.
Save dopplesoldner/9602502 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