Install by referring to the official materials. GitHub - AdoptOpenJDK/homebrew-openjdk: AdoptOpenJDK HomeBrew Tap
$ brew tap AdoptOpenJDK/openjdk
$ brew cask install adoptopenjdk14
$ /usr/libexec/java_home -v 14
/Library/Java/JavaVirtualMachines/adoptopenjdk-14.jdk/Contents/Home
Describe it in ~ / .bashrc or ~ / .zshrc as needed.
$ export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-14.jdk/Contents/Home
$ PATH=${JAVA_HOME}/bin:${PATH}
$ java -version
openjdk version "14" 2020-03-17
OpenJDK Runtime Environment AdoptOpenJDK (build 14+36)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 14+36, mixed mode, sharing)
$ javac -version
javac 14
$ which java
/Library/Java/JavaVirtualMachines/adoptopenjdk-14.jdk/Contents/Home/bin/java
$ which javac
/Library/Java/JavaVirtualMachines/adoptopenjdk-14.jdk/Contents/Home/bin/javac
$ ls /Library/Java/JavaVirtualMachines/adoptopenjdk-14.jdk/Contents/Home/bin/
jaotc javap jfr jmap jstack rmiregistry
jar jcmd jhsdb jmod jstat serialver
jarsigner jconsole jimage jpackage jstatd
java jdb jinfo jps keytool
javac jdeprscan jjs jrunscript rmic
javadoc jdeps jlink jshell rmid
Recommended Posts