How to set the Java version on Mac OS X
Set the version of jdk to use
Thu, 10 Jan 2019
I have multiple versions of Java on my mac and its not intuitive to set a default JDK to use. This command will point to the version of java that you want to use.
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
Run this command to check the current working version of java
echo $(/usr/libexec/java_home)