AppBundle抛出“LSOpenURLsWithRole()失败,错误-10810”用java 7或8编译之后 [英] AppBundle throws "LSOpenURLsWithRole() failed with error -10810" after compiling with java 7 or 8

查看:2412
本文介绍了AppBundle抛出“LSOpenURLsWithRole()失败,错误-10810”用java 7或8编译之后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将jdk升级到版本7_45。编译并执行jar后,工作正常,我将其打包到应用程序包中。但不幸的是,我收到此错误消息LSOpenURLsWithRole()失败,错误-10810为文件/Users/.../MyApp.app。与jdk 8 Early Access相同的问题。我也。尝试在info.plist中为JVMVersion键设置不同的设置

I upgraded jdk to version 7_45. After compiling and executing the jar, which works fine, i packed it into an application bundle. But unfortunately i get this error message "LSOpenURLsWithRole() failed with error -10810 for the file /Users/.../MyApp.app". The same problem with the jdk 8 Early Access. I also. tried different setting in the info.plist for the "JVMVersion" key

由于jar本身工作正常,我可以通过将JavaApplicationStub替换为我自己的可执行文件来解决这个问题。只需要调用java -jar ./.../MyApp.jar。但不确定这是否是解决此问题的正确方法。有什么建议?谢谢。

Since the jar itself works fine, i could do a workaround by replacing the JavaApplicationStub with my own executable which simply would call "java -jar ./.../MyApp.jar". But not really sure if that is a proper way to fix this issue. Any Suggestions? Thanks.

推荐答案

我有点解决了这个问题。我看了一下Processing应用程序包。我认为它主要与info.plist中的以下行有关,我在这里找不到:

I kinda solved the problem. I took a look at a Processing app bundle. I think it mainly has to do with following lines in the info.plist which were missing in mine:

<key>JVMOptions</key>
    <array>

      <string>-Xdock:icon=Contents/Resources/fireworks.icns</string>
      <string>-Dapple.laf.useScreenMenuBar=true</string>
      <string>-Dcom.apple.macos.use-file-dialog-packages=true</string>
      <string>-Dcom.apple.macos.useScreenMenuBar=true</string>
      <string>-Dcom.apple.mrj.application.apple.menu.about.name=Main</string>
      <string>-Dcom.apple.smallTabs=true</string>
    </array>

这篇关于AppBundle抛出“LSOpenURLsWithRole()失败,错误-10810”用java 7或8编译之后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆