Created
August 9, 2019 01:16
-
-
Save ckarthickit2/6404b001ccadb1f45be89ac1f1b3e53d to your computer and use it in GitHub Desktop.
Swithc Java Version on MAC
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 Java versions installed | |
| /usr/libexec/java_home -V | |
| # Java 11 | |
| export JAVA_HOME=$(/usr/libexec/java_home -v 11) | |
| # Java 1.8 | |
| export JAVA_HOME=$(/usr/libexec/java_home -v 1.8) | |
| # Java 1.7 | |
| export JAVA_HOME=$(/usr/libexec/java_home -v 1.7) | |
| # Java 1.6 | |
| export JAVA_HOME=$(/usr/libexec/java_home -v 1.6) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment