签署要通过 Web Start 使用的 jar
我有一个使用 Swing 的 java web start 应用程序,需要允许用户打开其计算机上的本地文件。我的应用程序无法运行,因为它说我尝试使用的单个 jar 未签名。不过我还是签了字。
在我的 .jnlp 文件中,我将安全性指定为:
<security>
<j2ee-application-client-permissions/>
</security>
并且我使用以下命令来创建 keytoare 签名我的 jar 文件 validator.jar:
keytool -genkey -keystore mykeys -alias https://www.mydomain.com
jarsigner -keystore mykeys -storetype JKS validator.jar https://www.mydomain.com
有什么想法吗?
谢谢!
I have a java web start app that uses Swing and needs to allow a user to open a file local on their machine. My application is failing to run because it says that the the single jar I am trying to use is unsigned. I did however, sign it.
In my .jnlp file I am specifying security as:
<security>
<j2ee-application-client-permissions/>
</security>
and I used the following commands to create the keystoare sign my jar file, validator.jar:
keytool -genkey -keystore mykeys -alias https://www.mydomain.com
jarsigner -keystore mykeys -storetype JKS validator.jar https://www.mydomain.com
Any ideas?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否拥有与签名 jar 中包含的 jnlp 文件相同(具有相同的确切内容)的 APPLICATION.JNLP 文件?
它将位于您的 resources/JNLP-INF 目录中。
另外-你在使用maven吗?
maven 有插件可以帮助签署 jnlps
do you have the APPLICATION.JNLP file that is the same (has the same exact content) of your jnlp file that is included in the signed jar?
it would be located in your resources/JNLP-INF directory.
also- are you using maven?
maven has plugins to help with signing jnlps
@Tom因为我只需要允许用户在本地打开文件进行处理,所以我决定使用FileOpenService。感谢您的帮助。
@Tom Since I only need to allow the user to open a file locally for processing, I decided to use the FileOpenService. Thanks for the help.