Last active
April 24, 2020 19:11
-
-
Save ashimjk/e6c0cdb9ac19e21ece2e221ee22ac21b 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
# Note | |
# On Mac OSX, Java should installed in this folder; it is Mac’s standard. | |
/Library/Java/JavaVirtualMachines/ | |
# Update repo | |
brew update | |
# Add adoptopenjdk/openjdk | |
brew tap adoptopenjdk/openjdk | |
# Find all available JDK. | |
brew search jdk | |
# Install JDK | |
brew cask install adoptopenjdk8 | |
# JDK will installed in | |
/usr/libexec/java_home -V | |
# Now Homebrew will install the JDK at folder /Library/Java/JavaVirtualMachines/ | |
# If we install multiple version of jdk, by default, Mac takes the highest version. | |
# In .bash_profile, add following code | |
export JAVA_HOME_8=$(/usr/libexec/java_home -v1.8) | |
# Java 8 | |
export JAVA_HOME=$JAVA_HOME_8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment