In you are using OS X 10.10 Yosemite or OS X 10.11 El Capitan, you would have come face to face with the aboslutly annoying pop up that appears out of no where and asks you to install the Java Runtime Environment. This happens when you installed an app that requires Java to execute. But, the issue is that even if you have the latest version of Java runtime installed from the Oracle website, this issue does not go away.
The fix for this is relatively simple. You have to head over to Apple’s website and go to the Java downloads section and download and install the latest Java for OS X version. Once you’re done, you will stop seeing the damn annoying pop up every hour on your Mac.
It would be easier to figure out the solution if Apple’s pop up message redirected users to their own website to downlaod the correct package, rather than taking users to Oracle’s website which does not fix the issue. This is not to say that you do not need Oracle’s runtime installed as well for certain apps but apparently, it has nothing to do with this pop up message.
Even though this is a quick solution, it is not recommended that you install Java, if you do not need it. Java, just like Flash, has been known to be a highly insecure runtime and over time, tons of zero-day exploits have been discovered in it. Thanks to the rapidly increasing usage of HTML5 and native APIs by developers, users rarely come across Java applets or desktop apps that need Oracle’s runtime. Even if you do, it is always a good idea to look for alternatives that do not need Java. You never get the same performance, security, look and feel and usability from a Java based app that you can get with a native app for Mac.