Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Aug 13 '12 at 3:36

This question came from our site for professional and enthusiast programmers.

3  
Isn't that pretty much what Apple's existing dialog says already? –  Mathias Schwarz Aug 1 '12 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 '12 at 22:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.