Hyrbid Mac Apps Java 1.6/1.7

Mike Murray ashesfall at gmail.com
Tue Jul 2 14:38:38 PDT 2013


*This may or may not be relevant to you guys on here, but it was suggested
I post here as well as on java-dev at lists.apple.com*

--

Greetings fellow strugglers in the war with Java on the Desktop,

I've got a few things that [from recent posts here] appear to be of some
value to the community.

1. An application stub, written in C, which is capable of starting either
the 32 bit application stub for Java 1.6 compatible machines (resulting in
the app starting with Java 1.6, if it is installed on the machine, or
presenting the standard dialog to download Java 1.6, if it is not yet
installed) *or* *instead* starting the 64 bit application stub for Java 1.7
compatible machines (resulting in the app starting with a bundled JRE,
included in the app).* This was based on some work that was already up
here, so perhaps this is not of any special significance.*

2. An ant build file which produces a "hybrid" application that includes a
copy of the 1.7 JRE, as well as both stubs and the special stub mentioned
in step (1)*plus* a copy of some improvements to the MRJAdapter product (
http://www.java.net/project/mrj-adapter) that I have made to allow it to
run against the Mac Runtime stuff found in JRE 1.7 (the project page
appears to have no indication that this will be done by its author, and an
attempt to get added to the comitters list did not receive a response).

3. An ant task (also in Java) which merges the PLIST for a 32 bit JRE 1.6
compatible app bundle with the PLIST for a 64 bit JRE 1.7 compatible app
bundle. These PLISTs can be generated individually using the two products
mentioned elsewhere on this developer list (JarBundler and AppBundler),
then merged together as part of the build. [*This work is still in
progress, but an approaching deadline at work means it will be done very
soon*].


Anyway, I'm a bit new to this list so I'm not sure if I may be posting
redundantly, but these things provide an end to end solution for the
problem of distributing a hybrid app bundle which is compatible with all
the OS versions I can imagine people having in the wild, from Mac OS 10.5
onward. Plus, since the stub described in step (1) is a universal binary,
the user can switch between 32 bit and 64 bit modes in the same way they
would with other apps.

In other news, the fact that the app is in fact self contained, and
includes JRE 1.7, it should be permissible for it to be distributed in the
app store, even though users who are on machines without support for
running the embedded JRE will ultimately have to run their local JRE 1.6 *(I
can't speak to the legitimacy of this, as it appears to be a gray area in
the app store rules on bundling, and I am not a lawyer - at least not a
good one)*

Please contact me if you would like a copy of any this work, I've only done
it out of necessity and I am happy to share. Also, as it turns out, the app
in question requires open gl and the JOGL runtime and I've been able to get
a hybrid version of that running on both architectures and both JREs. I'm
open to discuss any of these challenges via gmail's built in chat app if
you have more questions about anything. (ashesfall at gmail.com)

Cheers.

-Michael Murray
(Software Junkie at the Center for the Study of Language and Information,
Stanford University)

-- 
--------------------------------------------------------------------------------------
Disco Mike - Amphicoelous (Original Mix)
Now available on Beatport
Buy it now at: http://btprt.dj/WeaNGz


More information about the macosx-port-dev mailing list