Getting OS X to Install Java 7 on App Launch
steve at weblite.ca
Wed Feb 5 20:37:10 PST 2014
As far as I know you can't. You would need to write your own launcher that
downloads the jre from a site that you host yourself.
Such a solution wouldn't be allowed in the app store either. The best
solution right now is to bundle the jre with your app. But I feel your
pain about app size.
On Feb 5, 2014 8:05 PM, "Will Herrmann" <wjherrmann at gmail.com> 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
> http://stackoverflow.com/q/21568826/531762, 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