Skip to content

Instantly share code, notes, and snippets.

@if6was9
Created January 11, 2013 19:18
Show Gist options
  • Select an option

  • Save if6was9/4513199 to your computer and use it in GitHub Desktop.

Select an option

Save if6was9/4513199 to your computer and use it in GitHub Desktop.
/etc/alternatives updates for new JDK
export NEW_JDK_HOME=/usr/local/jdk1.6.0_38
export NEW_JDK_PRIORITY=2
alternatives --install "/usr/bin/java" "java" "$NEW_JDK_HOME/bin/java" $NEW_JDK_PRIORITY
alternatives --install "/usr/bin/javac" "javac" "$NEW_JDK_HOME/bin/javac" $NEW_JDK_PRIORITY
echo $NEW_JDK_PRIORITY | alternatives --config java
echo $NEW_JDK_PRIORITY | alternatives --config javac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment