签名.jar文件 [英] Signing .Jar file

查看:198
本文介绍了签名.jar文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

林坐在有点问题的。林忙我们的支持团队创建一个PHP / HTML网站(Intranet)中,使生活一点时支持Linux机器更容易。

Im sitting with a bit of a problem. Im busy creating a php/html website (intranet) for our support team to make life a bit easier when support linux machines.

我有一个名为mindterm的.jar应用(免费版),并希望它运行在现场的小程序。

I have a .jar app called mindterm (the free version) and want to run it as an applet in the site.

然而,根据他们的网站,你必须有加载它作为一个小程序,否则它不能打开的TCP连接前的.jar文件签署。

However according to their site you have to have the .jar file signed before loading it as an applet otherwise it cant open tcp connections.

所以我做尽可能多的研究,我可以的时候,我曾与在JDK安装提供的jarsigner.exe和keytool.exe的文件走了过来。

So i did as much research as i could in the time i had and came up with the jarsigner.exe and keytool.exe files provided in the JDK installation.

不过我没有线索如何去签这个应用程序,这样我可以使用它。

However i do not have a clue how to go about signing this app so that i can actually use it.

任何帮助吗?

感谢

推荐答案

首先使用创建一个密钥对密钥工具

First create a key-pair using keytool.

keytool -genkey -alias somekeyname

然后使用的jarsigner 与您刚创建的密钥签名。

Then use jarsigner to sign it with the key you just created.

jarsigner /path/to/jar somekeyname

请注意,您需要使用相同的别名( somekeyname 这里)随着创建的关键之一。

Note, you need to use the same alias (somekeyname here) as the one you create the key with.

现在,因为证书是自签名,你的小应用程序的用户将被提示批准证书。一旦他们这样做,你的TCP连接应该工作。

Now, since the certificate is self-signed, the user of your applet will be prompted to approve the certificate. Once they do so, your tcp connections should work.

由于我假设你只使用小程序内部在组织,自签名的证书应该罚款。否则,你将不得不支付证书。在这种情况下,用户将不再需要接受后的第一次证书(如果他们选择始终允许)。

Since I assume you're only using the applet internally in your organization, self-signed certs should be fine. Otherwise you will have to pay for a certificate. In that case, your users will not need to accept the certificates after the first time (if they choose Always Allow").

这篇关于签名.jar文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆