Signing a JAR file, cannot get keytool to generate key
Help, unless signing the jar file would not be required. Let me give you a background of what I am trying to do so you know why I am requiring to sign my jar file.
I made an applet which will be use to save the content of a chess game (which I made myself) into a file. When I run the applet in eclipse, everything works fine. But when I load the applet in an html, I get an exception error, telling I need file permission.
Now, I was searching online about a solution to this, and I found, and correct me if I am wrong, that in order to do what I need to do through an html, running an applet, I need to sign my JAR file from which I am running the applet from the html.
For instance I am using this shell commands:
keytool -keygen -keystore myStore -alias myself
That seems to be fine, but when I run this line, I get a password prompt which does not allow me to enter anything. It is not that I don't know the password, because, I think it is asking me to enter a password I might want for the key certificate, and then, whats wrong is that the prompt does not allow for any character or number keys to be entered, it seems frozen. Not until I precess ^C (Ctrl C) to abort that function, that I am able to exit that, but nothing happens.
Help, what am I doing wrong. Do I need to sign my JAR or how can I perform the above file access routie without getting the exception.
Re: Signing a JAR file, cannot get keytool to generate key
To be more specific,
This is the exception that I am getting:
AccessControlException acess denied (java.io.FilePermission)
Re: Signing a JAR file, cannot get keytool to generate key
When you're entering the password, the characters are hidden. Just enter a password and hit enter.
Re: Signing a JAR file, cannot get keytool to generate key
Ok, I went through just fine...thanks.
However, when I run the following command:
jarsigner -keystore mykeystore -storepass keypass file.jar alias
I get an error stating: Could not find or load main class sun.security.tools.JarSigner
Anything on this?