Some older Mac apps (Adobe’s Photoshop is one) require Java in order to work. Java is not part of the macOS so it has to be installed manually. The problem is, the modern Java installer puts Java into a different location than it used to, so when these older apps look for Java, they don’t find it– because they are looking in the wrong place.
The solution is to install an older version of Java, with an installer that puts things where Adobe expects to find them.
You would think that clicking the “More Info…” button in the pop-up would take you to a page where you could download the proper version of Java… but that’s not the case. The “More Info…” button takes you to the page for the latest version of Java, not the older one.
Click here to go to the older, “Legacy” Java installer page on Apple’s website. You’ll see a picture of a lion. That’s because Lion (10.7) was the current macOS when that version of Java came out.
Download the installer from that page, run the installer, and you’re done. No more annoying pop-up.
UPDATE: it’s been reported that installing the Legacy Java does not work with Catalina (macOS 10.15).