Take the 2-minute tour ×

How can I make Lion's new Java installer prompt launch when my application is opened?

Example: http://kb2.adobe.com/cps/909/cpsid_90908.html

eclipse appears to do it but NetBeans does not.

share|improve this question
I remember there was a JARBundler application (or something similarly named) in the Developer/Utilities folder when you installed the Developer CD. Has that been updated with an option to launch the installer, maybe? –  Kainsin Jul 21 '11 at 15:14
That's not present in my Lion install - I'd probably need to install the JRE to get that, I'm guessing. And I'd rather not do that until I find out how to launch this prompt. :) –  Jake Petroules Jul 21 '11 at 15:40
Hi Jake. I don't have an answer for you, but I can tell you that my Java application got this "for free". I'm not sure what the OS is looking for when it decides to show this dialog. –  Matt Solnit Jul 21 '11 at 22:06
Just curious, what happens with NetBeans? Do you get some other error message instead? –  Matt Solnit Jul 21 '11 at 22:06
No message unless you launch it from Terminal... then it just says no JRE found (not exact wording). –  Jake Petroules Jul 21 '11 at 22:37
add comment

2 Answers

Going to the terminal and typing "java" triggers the popup you are looking for, provided Java is not installed on the system.

I however don't know how to trigger this popup afterwards

share|improve this answer
Unfortunately the dialog will read "to use java..." whereas I'd like it to read "to use <myapp>..." as eclipse does, for example. –  Jake Petroules Jul 24 '11 at 19:27
add comment

If I understand you correctly you would like to be able to run application originally written in java even on machine that does not have JRE installed and be able to show pop-up window that prompts user to install JRE.

Obviously you can implement script for each platform that does it. For example it could be VB script for windows, TCL/TK script for unix etc.

Other possibility is to use package generators that do the work for you. I used to use InstalAnywere and Multiplatform Installer (from Install Shield) and I think they have such functionality.

share|improve this answer
I don't think you're right. He wants very specifically in the case of Mac OS Lion to launch an OS-provided dialog that downloads and installs a Java runtime. –  Duncan McGregor Jul 21 '11 at 15:37
I know that he wants solution for MAC. I wrote abut Windows and Linux just as an example. I just said that there are 2 solutions and explained them. –  AlexR Jul 22 '11 at 5:03
I could easily write my own Java launcher, but I specifically want Lion's built-in dialog, as @Duncan said. –  Jake Petroules Jul 22 '11 at 23:50
add comment

Your Answer


