How To sign a .jar File in Java


Picture:Clock Published on May 11th, 2006 in Java

If you want to make your Applications more secure and prohibit tampering, make use of the jarsigner tool, which is an excellent & easy to use tool.
So, if you wanted to sign your jar file with your own keystore, which is called “myapplication.jar” , the command would look pretty much like this:

jarsigner -keystore C:myapplicationmykeystore -storepass password
-keypass Pwd1pwd -signedjar signedmyapplication.jar myapplication.jar pvKey

Here, mykeystore is the keystore present in the C:\myapplication folder. The password for the keystore is password. The password for the “pvKey” private key is Pwd1pwd. The alias for mykeystore is pvKey.

Share This

Trackback URL for this post:
http://www.yatblog.com/2006/05/11/how-to-sign-a-jar-file-in-java/trackback/


Shout it out!