Created
August 11, 2021 20:41
-
-
Save bipin-nag/34518ec843b5b7f3bf29d37fd9d41ddb to your computer and use it in GitHub Desktop.
macOS 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
#!/bin/bash | |
brew install jenv | |
echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.zshrc | |
echo 'eval "$(jenv init -)"' >> ~/.zshrc | |
source ~/.zshrc | |
brew install AdoptOpenJDK/openjdk/adoptopenjdk8 | |
brew install AdoptOpenJDK/openjdk/adoptopenjdk11 | |
brew install AdoptOpenJDK/openjdk/adoptopenjdk14 | |
java -version | |
ls /Library/Java/JavaVirtualMachines | |
jenv add /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/ | |
jenv add /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/ | |
jenv add /Library/Java/JavaVirtualMachines/adoptopenjdk-14.jdk/Contents/Home/ | |
jenv versions | |
jenv global 11 | |
java -version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment