Seems like there's 3 packages "openjdk", "cask java" and "adoptopenjdk".
Which one should be used?
1.4 brew install java to install the latest JDK 15. 1.5 Where does Homebrew install the java? Homebrew installed the JDK files and directories at /usr/local/Cellar/openjdk/ , and symbolic link at /usr/local/opt/openjdk points to the latest Java 15.0. 1 version.
Run brew install openjdk@11
In case you are managing java versions with jenv, also run:
sudo ln -sfn /opt/homebrew/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk
jenv add /Library/Java/JavaVirtualMachines/openjdk-11.jdk/Contents/Home/
To install latest:
brew cask install adoptopenjdk
To install a specific version
brew tap AdoptOpenJDK/openjdk
brew cask install adoptopenjdk8
brew cask install adoptopenjdk9
You can use AdoptOpenJDK for brew
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With