Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Leopard, Snow Leopard & 32bit, 64bit Preferences



Folks,

There was a discussion a while back on this list about 32bit & 64bit Java Preferences.  In summary, Snow Leopard supports 32 & 64bit Java, and Leopard supports 64bit Java only.  In our case, we want Snow Leopard to run 32bit (because we use native libraries that are only available in 32bit), but want Leopard to still run properly with 64bit Java (and we'll detect the architecture and not load the native libraries).  So we need our JavaApplicationStub to have both 32bit & 64bit slices (since we don't want to build & ship two different apps) and whichever is preferred will be used.

Mike Swingler suggested that we use LSArchitecturePriority in the Info.plist (as opposed to the deprecated JVMArchs key in the Java element in Info.plist).  However, this does not seem to work right.

The immediate issue we found was that altering the elements in
LSArchitecturePriority in an existing Info.plist did nothing.  It was as if it the order of the items in it (or the existence of it at all) just didn't matter.  OTOH, right-clicking on the app and choosing whether to run in 32bit or 64bit mode did change the mode.

Then we found that it seems like LSArchitecturePriority is being applied to new applications when they are installed.  (For example, after running the pkg installer, it accepted the priority in order of LSArchitecturePriority.)  However, the catch was that it was accepting the priority on Leopard too, even though there was no 32bit Java available.  When installing an app into Leopard with an LSArchitecturePriority that had i386 before x86_64, Java failed to start (giving an error message).

It seems like the only reliable way to prefer 32bit & fall back to 64bit if 32 isn't available is to use the
deprecated JVMArchs element.  Am I going about this the wrong way?

Thanks for any help.
Sam
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.