You can determine which version of the JDK is the default by entering java -version in a Terminal window. If the installed version is 12 Interim 0, Update 0, and Patch 0, then you see a string that includes the text 12. For example:$ java -versionjava version ' 12'Java(TM) SE Runtime Environment (build 12)Java HotSpot(TM) 64-Bit Server VM (build 23.2-b04, mixed mode)To run a different version of Java, either specify the full path, or use the javahome tool. For example:$ /usr/libexec/javahome -v 12 -exec javac -version. After installing Java for macOS 2012-006, can I continue to use Apple's Java 6 alongside the macOS JDK for Java 12?If you want to continue to develop with Java 6 using command-line, then you can modify the startup script for your favorite command environment. For bash, use this:$ export JAVAHOME=`/usr/libexec/javahome -v 12`Some applications use /usr/bin/java to call Java.
To test that Java is installed and working properly on your computer, run this test applet. Install Java on Mac. Download the jre-8u65-macosx-x64.pkg file. Review and agree to the terms of the license agreement before downloading the file. Double-click the.pkg file to launch it; Double-click on the package icon to launch install Wizard. After installing Java for macOS 2012-006, can I continue to use Apple's Java 6 alongside the macOS JDK or JRE for Java 9? If you want to continue to develop with Java 6 using command-line, then you can modify the startup script for your favorite command environment.
After installing Java for macOS 2012-006, /usr/bin/java will find the newest JDK installed, and will use that for all of the Java-related command-line tools in /usr/bin. You may need to modify those applications to find Java 6, or contact the developer for a newer version of the application.