Steps for signing an executable jar file 1) Create a new key in a new keystore as follows: keytool -genkey -keystore myKeystore -alias myself You will get prompted for a information about the new key, such as password, name, etc. This will create the myKeystore file on disk. 2) Then, create a self-signed test certificate as follows: keytool -selfcert -alias myself -keystore myKeystore This will prompt for the password. Generating the certificate takes a few minutes. 3) Check to make sure that everything is ok. To list the contents of the keystore, use the command: keytool -list -keystore myKeystore It should list something like: Keystore type: jks Keystore provider: SUN Your keystore contains 1 entry: myself, Tue Jan 23 19:29:32 PST 2001, keyEntry, Certificate fingerprint (MD5): C2:E9:BF:F9:D3:DF:4C:8F:3C:5F:22:9E:AF:0B:42:9D 4) Finally, sign the JAR file with the test certificate as follows: jarsigner -keystore myKeystore test.jar myself 5)) exporting the certificate to a file keytool -export -keystore myKeysotre –alias myself -file gc.cer