Last active
May 31, 2016 08:36
-
-
Save NineMvp/4e69cac34c4ba7084de7e51a465e6b0a to your computer and use it in GitHub Desktop.
switch java version base script
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
export JAVA_8_HOME=$(/usr/libexec/java_home -v1.8) | |
export JAVA_7_HOME=$(/usr/libexec/java_home -v1.7) | |
alias java7='export JAVA_HOME=$JAVA_7_HOME' | |
alias java8='export JAVA_HOME=$JAVA_8_HOME' | |
#default java8 | |
export JAVA_HOME=$JAVA_8_HOME | |
#credit http://stackoverflow.com/users/1037852/vegard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment