[英]Signing java application with bundled jre for mac using appbundler
I have created a java application and followed these tutorials to bundle it with a jre and convert to .app package: https://www.jemchicomac.com/signing-a-sandbox-app-in-osx/ http://speling.shemnon.com/blog/2014/04/10/getting-your-java-app-in-the-mac-app-store/我创建了一个 java 应用程序并按照这些教程将它与 jre 捆绑并转换为 .app 包: https ://www.jemchicomac.com/signing-a-sandbox-app-in-osx/ http://speling .shemnon.com/blog/2014/04/10/getting-your-java-app-in-the-mac-app-store/
I can create .app package successfully using their advises.我可以使用他们的建议成功创建 .app 包。 The problem is that when i try to use codesign command to sign myApp.app package, it fails with this error: code object is not signed at all In subcomponent: Path to MyApp.app/Contents/PlugIns/jre/Contents/Home/jre/lib/calendars.properties
问题是,当我尝试使用 codesign 命令对 myApp.app 包进行签名时,它失败并显示此错误:代码对象根本未签名在子组件中:MyApp.app/Contents/PlugIns/jre/Contents/Home/ 的路径jre/lib/calendars.properties
I deleted calendars.properties for testing, but the error occurred again for another file.The only way i have found is to remove whole jre folder form package and codesign works correctly.我删除了 calendars.properties 进行测试,但另一个文件再次出现错误。我发现的唯一方法是删除整个 jre 文件夹表单包并且协同设计工作正常。 then i sign jre executable files separately and copy jre folder to Plugins folder of myApp.app again.
然后我单独签署 jre 可执行文件并再次将 jre 文件夹复制到 myApp.app 的 Plugins 文件夹中。 Can anybody tell me what is the problem?
谁能告诉我是什么问题? and how can i do signing using methods offered in links above?
我如何使用上面链接中提供的方法进行签名? Thanks in advance.
提前致谢。
After a long investigation I found out from talking to an Apple engineer that the "jre" subfolder needs to have a file extension in order for codesign to behave properly.经过长时间的调查,我从与 Apple 工程师的交谈中发现,“jre”子文件夹需要有一个文件扩展名,才能使 codedesign 正常运行。 In my case changing the path from Contents/PlugIns/jre to Contents/PlugIns/jre.bundle solved the problem.
在我的情况下,将路径从 Contents/PlugIns/jre 更改为 Contents/PlugIns/jre.bundle 解决了问题。 Maybe codesign has been fixed since then, but if not I hope this is helpful.
也许从那时起 codesign 已经修复,但如果没有,我希望这会有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.