Even after upgrading to the latest version of Java, while running some applications on OS X 10.10 (Yosemite) or OS X 10.11 (El Capitan), users see a dialog box prompting to download Java.
OS X 10.11 (El Capitan) message:
OS X 10.10 (Yosemite) message:
This is most commonly because an application requires the legacy Java 6 provided by Apple. For the solution to this issue, see http://support.apple.com/kb/DL1572.