问题
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