我需要打包和分发使用java和DigitalPersona One-touch指纹SDK制作的指纹小程序。
目前,applet已经过测试并使用Netbeans 8
编译到jar中要分发小程序,需要打包和签名,因为我一直在寻找互联网上似乎没有帮助
如何签署jar文件?
如果我在本地使用自生成密钥对jar文件进行签名,它是否可以在客户端浏览器中使用?
在Netbeans将applet编译为jar之后,我只是将它复制到html的同一目录中并在浏览器中调用它,如下所示:
<applet id="fpa"
code="SensorApplet" archive="FingerprintApplet.jar"
width="300" height="400">
</applet>
applet运行时出现以下错误
java.lang.noclassdeffounderror: com/digitalpersona/onetouch/capture/event/DPFPDataListener
答案 0 :(得分:1)
How do i sign the jar files?
If I put that exact question into Google, the top hit is Signing JAR Files.
If I sign the jar files with self generated key locally, will it work in client browser?
Short answer, no. Long answer, nope. But even with a valid code signing certificate, it won't work in Chrome (they've removed all support for applets) and soon(?) won't be supported in IE or FF (at all - same deal as Chrome).
The only hope to get this applet on-screen for general users is to:
答案 1 :(得分:0)
我找到了问题的解决方案
我能够让这个Applet在Firefox浏览器中运行,虽然它会弹出三个安全对话框,我只需要检查&#34;我接受......&#34;然后单击“运行”
我简单地将Netbeans配置为在编译applet时使用自签名证书对Jar进行签名。
然后我将所有jar库包含在applet的archive参数中,如下所示
<applet id="fpa"
code="SensorApplet" archive="FingerprintApplet.jar, Jarlib1.jar, Jarlib2.jar, Jarlib3.jar"
width="300" height="400">
</applet>