Installez selon le document officiel. GitHub - AdoptOpenJDK/homebrew-openjdk: AdoptOpenJDK HomeBrew Tap
$ brew tap AdoptOpenJDK/openjdk
$ brew cask install adoptopenjdk11
$ /usr/libexec/java_home -v 11
/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
Décrivez en .bash_profile ou .bashrc si nécessaire.
export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
PATH=${JAVA_HOME}/bin:${PATH}
$ java -version
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.6+10, mixed mode)
$ javac -version
javac 11.0.6
$ which java
/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/bin/java
$ which javac
/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/bin/javac
$ ls /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/bin/
jaotc javap jfr jmap jstat rmiregistry
jar jcmd jhsdb jmod jstatd serialver
jarsigner jconsole jimage jps keytool unpack200
java jdb jinfo jrunscript pack200
javac jdeprscan jjs jshell rmic
javadoc jdeps jlink jstack rmid
Recommended Posts