
That will download an installer that you can use for OS X El Capitan (and Yosemite and Mavericks for that matter). Get legacy Java for OS X 2015-001 from Apple.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. 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. 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. Install Java SE 6 in OS X El Capitan from Apple

If you get stuck on “verifying…” during the installation process of Java, it’s because of rootless. 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. 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.

To be clear, if you do not need Java, you should not install 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. 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.
