简体   繁体   English

为什么使用OSX Jar Bundler打包时QuickTime QTSession.open失败?

[英]Why does QuickTime QTSession.open fail when packaged using OSX Jar Bundler?

I am using QuickTime for Java to display video within a Java desktop application. 我正在使用QuickTime for Java在Java桌面应用程序中显示视频。 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: 当此应用程序构建为jar文件时,一切正常,但是由于某些原因,当我使用此maven插件将应用程序打包为本地OSX应用程序捆绑包时,使用以下代码:

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. java.lang.UnsatisfiedLinkError:/System/Library/Java/Extensions/libQTJNative.jnilib:找不到合适的图像。 Did find: /System/Library/Java/Extensions/libQTJNative.jnilib: no matching architecture in universal wrapper 确实找到了:/System/Library/Java/Extensions/libQTJNative.jnilib:通用包装中没有匹配的体系结构

QuickTime for Java only works in 32-bit mode. QuickTime for Java仅适用于32位模式。 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. 尽管已将J2SE 5.0(32位)设置为Java应用程序的JVM,但似乎osxappbundle-maven-plugin创建的应用程序捆绑包默认运行在64位版本的JVM上。 Setting osxappbundle-maven-plugin to use a custom Info.plist that contains the following key: 将osxappbundle-maven-plugin设置为使用包含以下键的自定义Info.plist:

<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. 强制应用程序捆绑包以32位模式运行并解决问题。

Many thanks Vinegar for pointing me in the right direction. 非常感谢Vinegar为我指明了正确的方向。

I also found... you java application with java -d32 ... 我还发现...您使用Java -d32的Java应用程序...

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 当程序打包为jar时,无法读取文件并使用gson解析 - Fail to read file and parse with gson when the program packaged as jar 创建自定义工具包时,为什么createFrame在OSX上失败? - When creating a custom Toolkit, why does createFrame fail on OSX? 为什么Jetty独立JAR会自行下载? (与Maven打包) - Why does Jetty standalone JAR download itself? (packaged with Maven) 当我作为打包jar运行时,为什么文件路径没有占用? - Why File path is not taking when i run as packaged jar? 使用app bundler将Mac转换为Mac OSX App Bundle - Jar to Mac OSX App Bundle with app bundler 为什么在使用==时此代码会失败,而在使用&lt;=时会失败? - Why does this code fail when using == but work using <=? 为什么 Selenium 在 IntelliJ 中对我有效,但在命令行中运行 jar 时却失败了? - Why does Selenium work for me in IntelliJ but fail when I run my jar in the command line? 为什么spring boot在打包时不加载应用程序yml(带gradle)? - why spring boot does not load application yml when packaged (With gradle)? 生成jar时未打包.xml文件 - .Xml file is not packaged when I build jar 打包为jar时,Java反射性能下降 - Java reflection performance drops when packaged as jar
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM