How to Install Java in OS X El Capitan
Some Mac users require installing Java in OS X El Capitan, perhaps for compatibility with a particular web site or application, or because they’re a java developer. But Apple has becoming increasingly strict with Java, and by default it is no longer installed with a OS X 10.11 clean install, and you’ll find that after updating a Mac a prior version of JRE or JDK may no longer function.
Additionally, when trying to use some particular applications or web content, you may come across a “This application requires the legacy Java SE 6 runtime which is unavailable for this version of OS X.” error message, which means if you want to run that app you’re going to need to use an older version of Java.
Whatever the case, if you need Java JRE or Java JDK in OS X 10.11 or later, here’s how you can install it.
To be clear, if you do not need Java, you should not install Java. And if you’re not sure whether you need Java or not, that means you probably do not need Java at all, and you can also avoid installing java.
Mac users may need to disable rootless SIP protection in OS X before being able to successfully install Java, but you can enable it again after it has been installed. If you get stuck on “verifying…” during the installation process of Java, it’s because of rootless.
Install Java SE 6 in OS X El Capitan from Apple
You can install legacy versions of Java in OS X El Capitan by using the Java for OS X 2015-001 installer, which includes Java 6. To be clear, Java 6 is a version from 2013, it is outdated and no longer supported by Oracle, it has various known security holes, and is therefore inappropriate for most Mac users to install without a compelling reason. So, unless you have a need for Java 6 specifically, you’d likely want to get a newer version, or if you don’t need Java at all, just don’t install it.
That will download an installer that you can use for OS X El Capitan (and Yosemite and Mavericks for that matter).
If you run into errors on installation, it’s because you skimmed through the introduction and did not disable SIP / rootless on the Mac. Do that first and Java will install just fine.
Install Java 8 in OS X EL Capitan from Oracle
The other option is to get the most recently available version of Java from Oracle. You can start this in one of two ways:
- Open a Terminal and type “java -version” then click the “More Info” button to jump to the Java downloads page
- Or, go to the Java downloads page directly here on Oracle.com where you can find the JRE and the JDK
Again, you will likely need to disable SIP protection on the Mac before being allowed to complete the installation.