Created
April 23, 2019 09:55
-
-
Save steven-mi/83a175de06889b81f1a7a8dc94f3ffa2 to your computer and use it in GitHub Desktop.
switch java versions
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_7_HOME=$(/usr/libexec/java_home -v1.7) | |
export JAVA_8_HOME=$(/usr/libexec/java_home -v1.8) | |
export JAVA_9_HOME=$(/usr/libexec/java_home -v9) | |
alias java7='export JAVA_HOME=$JAVA_7_HOME' | |
alias java8='export JAVA_HOME=$JAVA_8_HOME' | |
alias java9='export JAVA_HOME=$JAVA_9_HOME' | |
#default java8 | |
export JAVA_HOME=$JAVA_8_HOME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment