Last active
November 16, 2023 04:16
-
-
Save saurabhariyan/57eef53d41d79a224849720688d7218e to your computer and use it in GitHub Desktop.
Java Setup
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
brew install openjdk@17 | |
sudo ln -sfn /usr/local/opt/openjdk@17/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-17.jdk | |
javahome() { | |
unset JAVA_HOME | |
export JAVA_HOME=$(/usr/libexec/java_home -v "$1"); | |
java -version | |
} | |
# alias j1.8='javahome 1.8' | |
# alias j11='javahome 11' | |
alias j17='javahome 17' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment