ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Programmatically Signing JAR Files
Subject:   Update on bugfix for this example
Date:   2002-03-15 10:13:47
From:   fmigge
I run into the same issues, here is what worked for me.


1. add: import java.util.jar.*;
2. rename function : private static Map updateManifestEntries( Manifest manifest, JarFile jarFile, MessageDigest messageDigest, Map entries )


to: private static Map updateManifestDigest( Manifest manifest, JarFile jarFile, MessageDigest messageDigest, Map entries )


3. as described in the 2nd e-mail, add the line: byte manifestBytes[]=serialiseManifest(manifest);
in function signJarFile() before line: jos.write( manifestBytes, 0, manifestBytes.length );


Happy compiling,
Frank