Getting OS X to Install Java 7 on App Launch

Scott Palmer swpalmer at
Wed Feb 5 20:38:31 PST 2014

As you seem to be aware, with Java 7 and later you are expected to embed the JRE in your application bundle.  I think the JavaFX packager will do this for you.  The size is usually not relevant these days and the added reliability makes up for it anyway. You leave no room for the user to download the wrong version or to introduce a bug by downloading a later version that you haven't tested with.

However, if you wish for the user to use a shared instance of Java 7, you should probably use Java Web Start or an Applet to deliver your application.  I believe the java packaging tools will generate some JavaScript that will help get the shared JRE installed.


> On Feb 5, 2014, at 11:04 PM, Will Herrmann <wjherrmann at> wrote:
> Java is no longer installed by default on OS X, but fortunately if a user tries to launch a Java app for the first time, they receive the following message: "To open "Test App", you need a Java SE 6 Runtime. Would you like to install one now?"
> However, this prompts to install Java SE 6 rather than Java SE 7, which has been out for some time. This even happens on OS 10.9.1. I'm considering making my app require Java SE 7, but I want to ensure that users will be downloading the proper version (I'm aware I can bundle the JRE, but I would prefer not to add it since it would quadruple the app size). Ideally, I'd like for the dialog box shown above to continue to be shown, but instead of downloading Java SE 6, it downloads Java SE 7.
> I tried changing the JVMVersion key in the Info.plist file of my application to 1.7+, but that didn't make any difference and it still prompted to download Java SE 6 (which if it actually did require it, would result in the user being unable to install the app).
> Is there a way that I can make this dialog prompt to install Java 7?
> I originally posted this on Stack Overflow at, but didn't receive a reply and it was suggested I try this mailing list. Feel free to respond either here or there.
> Thanks in Advance,
> -Will Herrmann

More information about the macosx-port-dev mailing list