These documentation pages are no longer current. They remain available for archival purposes. Please visit
https://docs.oracle.com/javase for the most up-to-date documentation.
How to install Java JDK (Java Development kit 12) on Mac OS. Download and install Java on Mac OS X. We will also update the JAVAHOME environment variable ne. Apple Tuesday shipped its first Java update for the Mac OS since last fall, when it also disclosed plans to 'deprecate' the Java runtime in Leopard and Snow Leopard. Site sponsor Operator Headgap Systems specializes in heavily upgraded Macs capable of running older versions of Mac OS X (and even Mac OS 9). Does Mac OS X 10.7 'Lion' support Java and Java applications? Mac OS X Lion does support Java and Java applications, but the runtime environment is not installed by default.
System: Mac OS X 10.8.2, Intel Core Duo. Installed Java: Apple 1.6.037-b06-434; Oracle Java SE Run Time environment:7u9) Oracle Java SE jdk-7u9-macosx-x64.dmg) Output of /usr/bin/java -version is: Java SE runtime environment 1.7.009-b05. The java.com website signals on the installed version web page): Version7 Update 9 installed.
Q: How do I install Oracle Java?
A: See the JDK 7 and JRE 7 Installation Guide for the Mac.
Q: How do I install JavaFX?
A The JavaFX SDK and runtime are included in the installation of the JDK and JRE respectively, and they are integrated into the same directory structure. For information on how to work with JavaFX, see the JavaFX Documentation.
Q: Can I restore Apple Java 6 after uninstalling Oracle Java 7?
A: Go back to Apple Java 6 using the following instructions:
- Uninstall Oracle Java 7 by deleting the plug-in file. From a Terminal window enter:
- Create a symlink using the following command, entered on a single line:
Q: I am running Mountain Lion (OS X 10.8) or later and Gatekeeper is blocking an app from launching. What is going on?
A: Gatekeeper, introduced in Mountain Lion (OS X 10.8), is designed to prevent potentially malicious apps from launching. When you attempt to launch an app that doesn't meet certain criteria, Gatekeeper will block the launch. To override this, you can modify Gatekeeper's default settings, or explicitly right/control-click the application and choose Open.
To create a Java application that will launch without interruption under the default Gatekeeper settings, the app must be bundled with a JRE, use Oracle's launcher stub, and be signed with an Apple Developer ID. For more information on creating an app that satisfies these requirements, see Packaging a Java App for Distribution on a Mac.
Q: What happened to the Java Preferences app in Application -> Utilities?
A: The Java Preferences app was part of Apple Java installation and is not used by Oracle Java. Therefore, OS X releases from Apple that do not include Apple Java will not include Java Preferences.
One of the functions of Java Preferences was to set the current version of the JRE. Under Oracle Java, only a single version of the JRE can be installed at a time. For more information, see JRE 7 Installation for Mac OS X.
To access the Java Control Panel, click the Java icon in the System Preferences panel. If the Java icon is not present (under the Other category) in System Preferences, you do not have an Oracle JRE installed.
Q: I have Oracle's version the JRE installed, but it is not listed in Java Preferences.
A: This is correct. The JRE will not show up in the Java Preferences list unless you install the full JDK.
Q: I have Oracle's version of the JRE installed, but when I try to use java from the command line, it does not work.
A: Installing a JRE from Oracle does not update java -version symlinks or add java to your path. For this functionality, you must install the full JDK.