Question

I am using QuickTime for Java to display video within a Java desktop application. Everything works fine when this application is built as a jar file, but for some reason when I use this maven plugin to package the application to look like a native OSX application bundle, the following code:

try {
  QTSession.open();
} catch (Throwable t) {
  logger.error("QTSession was unable to open", e);
}

throws the following error:

java.lang.UnsatisfiedLinkError: /System/Library/Java/Extensions/libQTJNative.jnilib: no suitable image found. Did find: /System/Library/Java/Extensions/libQTJNative.jnilib: no matching architecture in universal wrapper

Was it helpful?

Solution

QuickTime for Java only works in 32-bit mode. Despite having J2SE 5.0 (32-bit) set as the JVM for java applications, it would seem as though application bundles created by the osxappbundle-maven-plugin defaults to run on a 64-bit version of the JVM. Setting osxappbundle-maven-plugin to use a custom Info.plist that contains the following key:

<key>LSArchitecturePriority</key>
<array>
<string>i386</string>
<string>ppc</string>
</array>

Forces the application bundle to run in 32-bit mode and resolves the issue.

Many thanks Vinegar for pointing me in the right direction.

OTHER TIPS

I also found... you java application with java -d32 ...

(ref: http://macintoshnotes.wordpress.com/2009/12/07/quicktime-for-java-under-snow-leopard/)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top