Like most of the answers on the web around this message dialog, the answer from @Morgan Rodgers might be correct in the case that the application really does have a specific need for that ancient version of Java. However, for many applications, a current/modern version of Java will work just fine except that they are wrongly configured.
At least on Mavericks 10.9 through Catalina 10.15, you can edit the JVM capabilites to correctly reflect what your Java 10, 11 etc can do in this file:
/Library/Java/JavaVirtualMachines/<your modern java version>/Contents/Info.plist
You will need to replace the section around line 27 which looks like this:
with the correct set of capabilities:
As 1 mentions, the editing may need to be done via text editor using a temporary copy, which is moved back into place using sudo. Once copied back, don't forget to check the timestamp and content of the updated file reflect your edit and reboot.