On Jan 6, 2010, at 9:27 AM, Xochitl Lunde wrote: I have seen some mailing list threads
that suggest keeping Leopard builds around to be able to use Jam to build
for backward compatibility. I am not sure if I need to or should
do this. My program has a Java GUI which already uses an ant built
on Linux. I wanted Xcode to build me a nice little bundle though,
so on Mac OS 10.5.8 I created a project with a Java Application target
in Xcode 3.0. With little headache, this built me a great litte *.app
bundle that I transplanted to a 32-bit machine running Leopard using Java
1.5. My Java GUI requires 1.6 features, so the first thing the app
does is check which version of JVM launched it and then try to display
a helpful message about why you need Java 1.6 and where you ought to get
it from.
It would still be helpful to keep a Leopard machine around for testing, however you should be able to build on Snow Leopard with just a little more effort. What I read in an earlier thread was
that I need the Leopard build to be able compile for a target JVM of 1.4
or 1.5 so that my program can display a useful message instead of allowing
the command line to throw out a bunch of Java exceptions that don't mean
anything to non-Java-programmers (including me). Did I understand
that correctly?
You can still build on Snow Leopard with Java SE 6 and target older versions, but you have to specify the -source 1.4 -target 1.4 options to ant's javac invocation, and be careful not to use new API. If your "preflight" stub is the only part of your app that has to build this way, this shouldn't be a big problem. My colleague only has Snow Leopard,
so he cannot build my Java GUI from the project without converting the
targets. If he converts them, will they still work for me in Leopard?
Are we looking at an unending wellspring of issues with some developers
on Leopard and some developers on Snow Leopard?
Ant (and from Xcode's perspective, any "external") targets should be buildable going back to before 10.4. You can still use the same app bundling logic, or if you'd like, check out the JNI Library template in Xcode 3.0 that builds a full Java application. You can simply remove the parts you don't use, like the native library target, and use that as a base which builds on Leopard if you change the project file to be Xcode 2.4 compatible.
Ideally if you have an Xcode 2.4 compatible project file with external targets that build your Java resources using ant, with -source 1.4 -target 1.4, that should build equally well on both Leopard and Snow Leopard.
Cheers, Mike Swingler Java Runtime Engineer Apple Inc. |