I'll forget it soon, so it's a memorandum for myself.
Put the following in .bashrc.
.bashrc
~/.bashrc
export JAVA_HOME=`/usr/libexec/java_home -v "1.8"` export PATH=$JAVA_HOME:$PATH
To make Java 9 /usr/libexec/java_home -v "9"
/usr/libexec/java_home -v "9"
Recommended Posts