我在 com.abc.applet 包中有 TViewerApplet.class。要签署 jar 文件,我遵循以下步骤:
1)使用cmd创建com文件夹的jar文件jar cf Viewer.jar com
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
>
但问题是我明白了
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