views:

745

answers:

2

I currently am looking at a bug related to an application crash when running on Mac OS X. The crash only seems to occur when using Java 6, with the Mac OS X 10.5 Update 1 (64 bit mode). The problem does not show up on 32bit Mac Java installs.

From what I have read via google, the issue seems to be related to the fact that the application is making use of QuickTime libraries, which seem to be having problems with Java 6 running in 64 bit mode.

QuickTime for Java is based on 32-bit Carbon libraries, and has been effectively in “maintenance mode” for a while. Unfortunately someone manages to get the JNI (or JNA?) code working it’s going to be difficult to work around the problem using QTKit.

Related references:

A: 

My experience is that native 32-bit libraries cannot be loaded by Mac Java 6 at all. On the other hand, since Java 5 is still the default on Mac OS X, I am still using Java 5 for those applications requiring native libraries, since that is what my Mac customers use.

I realize that this is not, perhaps, a very helpful answer, but unless someone can enlighten us on how to use 32-bit native libraries with Java 6, this negative answer is the best I can do.

Glenn
Yep, the Apple's Java 6 implementation for the Mac does not support 32-bit native code.
jsight
A: 

The JavaApplicationStub file in the app bundle was configured to run x86_64 which the library does not support. This is apparently new to the latest release of Java.

In order to solve the problem, use the lipo tool. Here is what I did:

lipo -remove x86_64 JavaApplicationStub -output JavaApplicationStub

In addition it is also recommended that the LSArchitecturePriority key be added to the info.plist. I added the following to the main properties:

LSArchitecturePriority i386 ppc

This specifies the allowed architectures in their preferred order.

http://discussions.apple.com/thread.jspa?messageID=9706490

leaf dev