This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error while siging the jar using jar signer

 
Anil Kumar
Ranch Hand
Posts: 38
Eclipse IDE Tomcat Server Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Anil Kumar
Ranch Hand
Posts: 38
Eclipse IDE Tomcat Server Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot . I realized the mistake which I did. It is working now.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic