Try this first download the Beta version of
Java for OS X 2015-001 Beta
Java for OS X 2015-001 beta installs the legacy Java 6 runtime for OS X 10.11 El Capitan.
This package is exclusively intended for support of legacy software, and installs the same deprecated version of Java 6 included in the 2013-005 release. If you require Java for applets or other non-legacy uses it is recommended you download the latest version of Java from http://java.com.
https://support.apple.com/kb/DL1824?locale=en_US
How to fix this application requires the legacy Java SE 6 runtime which is unavailable for this version of the OS X
If anyone is using the beta version of El Captian and need to downgrade their Java to 6 here is what worked for me
I got all my applications working again after the upgrade – Thought I would share.
How to fix and install Java SE 6 errors in El Capitan
1. Download Apple's Java Package from https://support.apple.com/kb/DL1572?locale=en_US
2. Download Pacifist - https://www.charlessoft.com
3. Download UninstallPKG - http://www.corecode.at/uninstallpkg/
4. open UninstallPKG app search for Jdk and uninstall any version of JDK on your Mac
5. open the JavaForOSX.dmg and Drag it to JavaForOSX.pkg
from JavaForOSX2014-001.dmg to your desktop
6. Run this command
sudo nvram boot-args="rootless=0";osascript -e 'tell app "loginwindow" to «event aevtrrst»'
7. After your computer restarts Drag JavaForOSX.pkg and onto the Pacifist application to open it.
8. click on the JavaForOSX.pkg" and install it with administrator privileges.
9. now click and install JavaForOSX.pkg
___________________________________