Created
April 24, 2020 18:27
-
-
Save ashimjk/88e023043c3e4fe5f78150c4fe4f3873 to your computer and use it in GitHub Desktop.
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
# For switch jdk, we can use jEnv (https://www.jenv.be/) | |
# This is for manual | |
# Export JAVA_HOME from .bash_profile | |
vim ~/.bash_profile | |
# In .bash_profile, add following code | |
export JAVA_HOME_8=$(/usr/libexec/java_home -v1.8) | |
export JAVA_HOME_11=$(/usr/libexec/java_home -v11) | |
# Java 8 | |
export JAVA_HOME=$JAVA_HOME_8 | |
# Java 11 | |
# export JAVA_HOME=$JAVA_HOME_11 | |
# Reload profile | |
source ~/.bash_profile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment