Last active
August 29, 2015 14:23
-
-
Save kentliau/41a051ce5fe2ccb30d07 to your computer and use it in GitHub Desktop.
Multiple Java version switching
This file contains hidden or 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
# List all available Java version and currect set Java version | |
/usr/libexec/java_home -verbose | |
# Switch to the Java version you want temporarily | |
export JAVA_HOME="`/usr/libexec/java_home -v '1.6*'`" | |
# Run your desire Java application (.jar) in your desire version | |
java -jar application.jar | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment