简体   繁体   English

使用 appbundler 为 mac 使用捆绑的 jre 签名 java 应用程序

[英]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.

相关问题 捆绑jar文件后获取Java系统输出(由MAC中的AppBundler进行) - Get Java system output after the jar file is bundled (by AppBundler in MAC) 在 Mac 上运行基于 Java 的应用程序,而无需在其上安装 Java,而是使用捆绑的 JRE - Run Java based Application on mac without having to install Java on it but using bundled JRE instead 指向由 JAVA_HOME 定义的 JRE 的 Java AppBundler 应用程序 - Java AppBundler application pointing to JRE defined by JAVA_HOME java jre jdk设置使用android捆绑jre - java jre jdk setup using android bundled jre 在OSX上使用捆绑的JRE - Using a bundled JRE on OSX Mac捆绑的Java应用程序无法启动 - Java Application Bundled for Mac doesn't start launch4j 捆绑 JRE 错误。“此应用程序被配置为使用捆绑的 Java 运行时环境,但运行时丢失或损坏” - launch4j bundled JRE error .“This application was configured to use a bundled Java Runtime Environment but the runtime is missing or corrupted” 使用捆绑的 jre 运行 java 安装程序 - running java installer with bundled jre 如何使用捆绑在JavaFX 2自包含应用程序中的JRE在Mac OS X上启动可运行的JAR? - How to use the JRE bundled in a JavaFX 2 self-contained application to start a runnable JAR on Mac OS X? Eclipse仍在Mac OSX上使用java 6作为jre - Eclipse still using java 6 as jre on Mac OSX
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM