Even after upgrading to the latest version of Java, while running some applications on macOS Sierra (10.12), El Capitan (OS X 10.11), or Yosemite (OS X 10.10), users see a dialog box prompting to download Java.
macOS Sierra 10.12 or Yosemite (OS X 10.10) 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.
You might also be interested in: