Skip to content

Instantly share code, notes, and snippets.

@rbellamy
Forked from tankchintan/gist:1335220
Last active December 17, 2015 17:29
Show Gist options
  • Save rbellamy/5646662 to your computer and use it in GitHub Desktop.
Save rbellamy/5646662 to your computer and use it in GitHub Desktop.
# Install OpenJDK 1.7
sudo yum install java-1.7.0-openjdk
# Check if the default java version is set to sun jdk
java -version
# If not then lets create one more alternative for Java OpenJDK 1.7
alternatives --install /usr/bin/java java /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.19.x86_64/jre/bin/java 20000
alternatives --install /usr/bin/java java /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.19.x86_64/jre/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