I'm trying to deploy a Java applet on my website. I also need to sign it, because I need to access the clipboard. I've followed all the signing tutorials I could find but have not had any success. Here is what I've done so far:
- Wrote an applet in NetBeans. It runs fine in the applet viewer.
- Made a .jar file out of it.
- Created a certificate by doing this:
keytool -genkey -keyalg rsa -alias myKeyName
keytool -export -alias myKeyName -file myCertName.crt
- Signed it wtih jarsigner like this:
jarsigner "C:my pathmyJar.jar" myKeyName
- Made an html file containing this:
<html>
<body>
<applet code="my/path/name/myApplet.class" archive="../dist/myJar.jar"/>
</body>
</html>
When I open that html file, I never get the security confirmation dialog box (and thus get the "java.security.AccessControlException: access denied" error). This happens on all browsers.
Am I missing a step?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…