Dec 07

Creating a test certificate and signing your jar just involves three simple commands. Following shows the commands needed to firstly create your test certificate and add the certificate (with an alias of myCertAlias) to a keystore (named myKeyStore).

keytool -genkey -keystore myKeyStore -alias myCertAlias
keytool -selfcert -keystore myKeyStore -alias myCertAlias

The above only needs to be done once.
You can then use the keystore to sign your jar using the following command.

jarsigner -keystore myKeyStore jarfile.jar myCertAlias

written by objects \\ tags: , , , , , ,

Apr 28

Running the following will create a new keystore named myKeystore and password secret.

keytool -keystore myKeystore -genkey -keyalg RSA -alias mycert

written by objects \\ tags: , ,