20070729 Sunday July 29, 2007

Creating a self-signing certificate and signing a jar file.

To create a certificate that you can use to self-sign your JAR files, launch the keytool application (must be in your path):

keytool -genkey -alias <YOUR_ALIAS> -keystore <YOUR_KEYSTORE_NAME>.keystore

<YOUR_ALIAS> and <YOUR_KEYSTORE_NAME> can be anything you want, just don't forget them. When you run the tool, it will ask your your name, organization, address, etc., as well as the keystore password. Once you answer those questions, it will create the keystore and certificate for you.

You can then sign a jar as follows:

jarsigner -keystore <YOUR_KEYSTORE_NAME>.keystore -storepass <YOUR_KEYSTORE_PASSWORD> <YOUR_JAR_FILE> <YOUR_ALIAS>

That should do it.

Posted by rickg ( Jul 29 2007, 11:50:05 PM PDT ) Permalink Comments [0]
Comments:

Post a Comment:

Name:
E-Mail:
URL:

Your Comment:

HTML Syntax: NOT allowed