I have unsigned applet. For signing it I have created a keystore using the following command
Then I sign it using the following command
When I sign the jar (sign.jar ) using JAR Signer Command, I am getting exception message “Could not read LOC header ". The detail stack trace is attached for reference.
Exception in thread "main" java.lang.InternalError: jzentry == 0,
jzfile = 46472800,
total = 4,
name = Sign.jar,
i = 1,
message = couldn't read LOC header
at java.util.zip.ZipFile$3.nextElement(ZipFile.java:429)
at java.util.zip.ZipFile$3.nextElement(ZipFile.java:415)
at sun.security.tools.JarSigner.getManifestFile(JarSigner.java:1449)
at sun.security.tools.JarSigner.signJar(JarSigner.java:836)
at sun.security.tools.JarSigner.run(JarSigner.java:194)
at sun.security.tools.JarSigner.main(JarSigner.java:75)
I have rebuild the jar file and repeated the process again but I am getting the same error. Please let me know where I am
going wrong ?
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35237
7
posted
0
You should specify a different file for the "-signedjar" option. As it is, the jar file is read and written to by the same process, which doesn't work.