You are on page 1of 1

How to unsign a signed jar file

Unpack signed jar file.


Delete all signature related information
Resign jar file using following command.
jar cmfv MANIFEST.mf test.jar test
here, test is a jar-file name which will be created. And it will contain
MANIFEST.mf file and test folder.
How to sign a jar file
Create a new key in new keystore.
keytool -genkey -keystore ks -alias xyz
keytool is key and certificate management tool. This command
generates new key in keystore named ks.
After executing this command you will be asked for information
regarding new key. And this command also generates new file ks.
Then create self-singed certificate.
keytool selfcert alias xyz -keystore ks
This command generates self-singed certificate.
To make sure everything is okay, list the content of the keystore using
following command.
Keytool list -keystore ks
To sign jar file use following command
jarsigner -keystore ks jarfile.jar xyz
Here xyz is alias name of the entry to process.

You might also like