Unsign, resign and update .JAR manfests

A .jar file is simply a .zip with a funky extension. Rename the .jar to .zip and unzip the file.

CD into the META-INF dir and delete everything EXCEPT the manifest file.

Edit the Manifest file and remove all the SHA hashes (probably not necessary)

Once this has been done, rezip the file

zip -r yourjarfilename.jar *

Now we need to sign the jar. (Make sure you have the latest JDK installed)

To do this we create a key:

/usr/java/jdk1.7.0_21/bin/keytool -genkey -alias xenvncviewer -validity 365

Follow the bouncing ball filling in all the details.

Then sign your JAR file with the following:

/usr/java/jdk1.7.0_21/bin/jarsigner xenvncviewer.jar xenvncviewer

That is it!

Comments are closed.