1

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?

2
  • 3
    Isn't that pretty much what Apple's existing dialog says already?
    – Mathias Schwarz
    Aug 1, 2012 at 20:26
  • No. It says "To open java, you need a Java SE 6 runtime. Would you like to install one now?" The key difference that will make all the difference to my users is "My App requires Java." It's also very nice if the message says "Java is not currently installed on this system." which the default message doesn't have.
    – Jason
    Aug 7, 2012 at 22:08

0

You must log in to answer this question.

Browse other questions tagged .