Mountain Lion has this wonderful feature where running "java" pops up a dialog prompting the user to install Java (if it is not already installed). This is nice, but I'd prefer to have more control over this process because my users may not understand or know what this dialog is for.
I want to test if Java is present, then prompt the user with a dialog containing the message
My App requires Java. Java is not currently installed on this system. Do you wish to download and install Java now?
And then, if the user clicks "Yes", the application will initiate the OS X builtin download and installation of Java.
How do I test if Java is present? How do I initiate the download without the default OS X prompt?