Last active
December 31, 2015 00:28
-
-
Save bzz/7907077 to your computer and use it in GitHub Desktop.
Multiple JDK on mac os x 10.8 to switch Oracle \ Apple provided java implementations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Thanks to http://superuser.com/questions/490425/how-do-i-switch-between-java-7-and-java-6-on-os-x-10-8-2 | |
echo "Oracle JDK installed:" | |
ll /Library/Java/JavaVirtualMachines | |
echo "Apple supplied JDK:" | |
ll /System/Library/Java/JavaVirtualMachines | |
echo "To run a specifinc version use:" | |
/usr/libexec/java_home -v 1.6 --exec java -version | |
/usr/libexec/java_home -v 1.7 --exec java -version | |
echo "Or" | |
JAVA_HOME=$(/usr/libexec/java_home -v 1.7) java -version | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment