简体   繁体   English

无法正确签名jar文件

[英]Unable to sign the jar file properly

I have TViewerApplet.class in com.abc.applet package.To sign the jar file I followed following steps: 我在com.abc.applet包中有TViewerApplet.class。要签名jar文件,请按照以下步骤操作:

1) Created jar file of com folder using cmd jar cf Viewer.jar com 1)使用cmd jar cf Viewer.jar com创建com文件夹的jar文件

2) Signed jar file using cmd 2)使用cmd签名的jar文件

 jarsigner -keystore "C:\Documents and Sett
ings\compstore" -storepass abcdef -keypass abcdef
-signedjar "C:\Documents and Settings\SignedViewer
.jar" "C:\Documents and Settings\Viewer.jar" signFiles

Added the below tag in jsp file 在jsp文件中添加了以下标签

<applet name="viewerApplet" id="TViewerApplet" width="100%" height="500" code="com.abc.applet" align="baseline" codebase="." mayscript="mayscript" archive="SignedViewer.jar,cmbview81.jar"> </applet <applet name="viewerApplet" id="TViewerApplet" width="100%" height="500" code="com.abc.applet" align="baseline" codebase="." mayscript="mayscript" archive="SignedViewer.jar,cmbview81.jar"> </applet > <applet name="viewerApplet" id="TViewerApplet" width="100%" height="500" code="com.abc.applet" align="baseline" codebase="." mayscript="mayscript" archive="SignedViewer.jar,cmbview81.jar"> </applet >

But the problem is I get 但问题是我明白了

Caused by: java.io.IOException: open HTTP connection failed:http://10.160.120.221:8086/ICMViewer/com/abc/applet.class
    at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
    at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
    at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    ... 9 more
Exception: java.lang.ClassNotFoundException: com.abc.applet

看起来问题不在于您签署了applet,而是HTML中applet-tag的配置错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM