
Sudo rm -rf /Library/Internet\ Plug-Ins/Java*

Sudo rm -rf /Library/PreferencePanes/Java* If you have any existing version of java installed on your machine, open terminal run following commands on you Mac. bin/bash -c "$(curl -fsSL )" Optional: Remove Existing Java We will use Homebrew (the package manager for MacOS) to install the required softwares, open a terminal and run following command to install homebrew on your Mac. For this purpose, we will use a well known Java Version Manager software called jEnv.Ĭommercial: Oracle Binary Code License Agreement ローカルでバージョンを指定するときは下記で設定します。 jenv local 11.In this article we will explorer how to install and manage multiple Java version on MacOS. * system (set by /Users/masa/.jenv/version) Jenv addで JDK を追加します。 jenv add jenv add /usr/local/Cellar/ /17.0.6/libexec/openjdk.jdk/Contents/Home

usr/local/Cellar/ /17.0.6/libexec/openjdk.jdk/Contents/Home 最後に Java8 をインストールします。 brew install sudo ln -sfn /usr/local/opt/ /libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-8.jdk インストールした JDK の確認

同様に Java11 をインストールします。 brew install sudo ln -sfn /usr/local/opt/ /libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk ちなみに brew install javaと brew install openjdkは同じです。
