Created
April 11, 2020 02:28
-
-
Save benweizhu/846929eb797c747cd17db0deb60921e0 to your computer and use it in GitHub Desktop.
How to switch java version on mac
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
https://stackoverflow.com/questions/21964709/how-to-set-or-change-the-default-java-jdk-version-on-os-x | |
alias j12="export JAVA_HOME=`/usr/libexec/java_home -v 12`; java -version" | |
alias j11="export JAVA_HOME=`/usr/libexec/java_home -v 11`; java -version" | |
alias j10="export JAVA_HOME=`/usr/libexec/java_home -v 10`; java -version" | |
alias j9="export JAVA_HOME=`/usr/libexec/java_home -v 9`; java -version" | |
alias j8="export JAVA_HOME=`/usr/libexec/java_home -v 1.8`; java -version" | |
alias j7="export 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