AppBundle throws “LSOpenURLsWithRole() failed with error -10810” after compiling with java 7 or 8

為{幸葍}努か 提交于 2019-12-30 18:46:12

问题


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

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.


回答1:


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>


来源:https://stackoverflow.com/questions/20325308/appbundle-throws-lsopenurlswithrole-failed-with-error-10810-after-compiling

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!