August 2017
Beginner
298 pages
7h 26m
English
Once you've installed a newer version of the JDK with an earlier version already installed, it is possible to switch what the currently selected version is.
On macOS and Linux, you do this by switching the value of JAVA_HOME
The following command switches the current Java platform to Java 8:
$ export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
To switch to Java 9, use the following command:
$ export JAVA_HOME=$(/usr/libexec/java_home -v 9)
Read now
Unlock full access