当前位置: 动力学知识库 > 问答 > 编程问答 >

osx - Java 6 Update - Mac OS X application crash related to QuickTime libraries

问题描述:

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:

  • http://www.newtonslore.com/category/things-from-the-big-fruit/mac/java-on-mac-os-x/
  • http://lists.apple.com/archives/quicktime-api/2009/Jun/msg00051.html
  • What are my options for running Java 6 on OS X?

网友答案:

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.

网友答案:

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

分享给朋友:
您可能感兴趣的文章:
随机阅读: