簡體   English   中英

無法正確簽名jar文件

[英]Unable to sign the jar file properly

我在com.abc.applet包中有TViewerApplet.class。要簽名jar文件,請按照以下步驟操作:

1)使用cmd jar cf Viewer.jar com創建com文件夾的jar文件

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

在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 >

但問題是我明白了

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