There are a few apps around – one is Oxygen, the superb XML editor – which still require the old Java 6 runtime, and will not run under more recent versions of Java.
You may recall from the days of OS X 10.7 Lion that Apple used to provide the Java 6 runtime. It still does: if an app complains that it needs this, you should obtain it from Apple here, as Oracle’s Java only provides more recent versions. Apple has updated this installer so that it works with, and on, OS X 10.11 El Capitan. And it does work.
What a tangled web we weave…