/usr/libexec/java_home -V
/Library/Java/JavaVirtualMachines/
, and this folder is Mac’s standard folder for Java installs./Library/Java/JavaVirtualMachines
.JAVA_HOME
./Library/Java/JavaVirtualMachines
JAVA_HOME
.~/.bash_profile
with a text editor.JAVA_HOME
, save and exit.Homebrew
(Step 1), and Java 14 manually (Step 2), so this Mac has three versions now. And the Mac is using the JDK 14.export JAVA_HOME
manually, it’s simple and easy to understand, no black box magic.~/.bash_profile
with a text editor like vim or nano, export JAVA_HOME
to the specified JDK we want to use on Mac.JAVA_HOME
point to JAVA 8.~/.bash_profile
and export JAVA_HOME
to other JDK version.