Packaging Java Applications targeting Apple Java 6 and Oracle Java 7+ (original) (raw)

Christopher Brown christopherbrown06 at gmail.com
Fri Jul 5 03:14:33 PDT 2013


Hello,

I have a question about on-going availability of the /usr/libexec/java_home Mac OS X command.

I've been following the different threads about the different ways of bundling a Java application as an ".app" with Mac OS X, using either JavaApplicationStub (which I've done in the past) or using the equivalent tool for Java 7 onwards. It would seem that that implies creating two variants of the application and hoping that the user picks the right one. The long-term recommended solution would appear to be "use the Oracle", for obvious reasons.

However, given that on a new project, we're going to use SWT instead of Swing, we've created an ".app" bundle that starts Java using an embedded ".sh" script (and neither stub, which conveniently side-steps needing to choose one stub or another, and avoids two versions). It relies on /usr/libexec/java_home and currently works fine.

I'm probably safe in assuming that at some point (OS X Mavericks / 10.9), the Apple Java 6 will be withdrawn. However, it would be great to have confirmation that the "java_home" command will continue to be supported and provided (as opposed to going down some hacky script that assumes paths, parses paths, and tries to sort them to pick the best version).

Thanks in advance, Christopher



More information about the macosx-port-dev mailing list