$ brew install jenv
$ echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.bashrc
$ echo 'eval "$(jenv init -)"' >> ~/.bashrc
$ brew cask install zulu7
$ /usr/libexec/java_home -V
Matching Java Virtual Machines (3):
14.0.1, x86_64: "OpenJDK 14.0.1" /Library/Java/JavaVirtualMachines/openjdk-14.0.1.jdk/Contents/Home
1.8.0_241, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home
1.7.0_262, x86_64: "Zulu 7.38.0.11" /Library/Java/JavaVirtualMachines/zulu-7.jdk/Contents/Home
$ jenv add /Library/Java/JavaVirtualMachines/zulu-7.jdk/Contents/Home
$ cd /Users/tofu/Projects/BotHack/javabots/JavaBot/
$ jenv local 1.7
$ jenv versions
system
* 1.7 (set by /Users/tofu/Projects/BotHack/javabots/JavaBot/.java-version)
1.7.0.262
zulu64-1.7.0.262
$ java -version
openjdk version "1.7.0_262"
OpenJDK Runtime Environment (Zulu 7.38.0.11-CA-macosx) (build 1.7.0_262-b10)
OpenJDK 64-Bit Server VM (Zulu 7.38.0.11-CA-macosx) (build 24.262-b10, mixed mode)
C'était bon
Recommended Posts