Java Code Signing with our Code Signing Certificates

The Comodo certificates we sell will work for ALL platforms, not just Windows. If you need to digitally sign a .JAR file, here are some instructions.

Comodo has some instructions up on their site in this PDF file, but at least one customer had some trouble with those instructions. If those don’t work for you, try this :

You need to have the Java runtime and Developer Kit installed.

To convert the .PFX/.p12 file into a Java keystore (.jks) file you’ll need a conversion utility. The Jetty open source web server contains a handy tool to do just that :

1. Go to http://dist.codehaus.org/jetty/ and go into the latest jetty- directory (not jetty-hightide!). Currently that is jetty-6.1.26.
2. Download jetty-.zip
3. Open the ZIP file and extract the file: jetty-/lib/jetty-.jar
4. Open a command shell and run:
java -classpath jetty-.jar org.mortbay.jetty.security.PKCS12Import .pfx .jks
Add paths where applicable, surrounding them by quotes where necessary, etc..
It will prompt you for the password.
5. Run:
keytool -list -keystore .jks -v | more
and take a note of the “Alias name” near the top of the output

Now you’re ready to sign your JAR file. For instructions, see http://docs.oracle.com/javase/tutorial/deployment/jar/signing.html

Note: you might want to use the -sigfile option to name the signature files something prettier than the “alias name”. Only the first 8 characters are used.

A big Thank You to Yvon Rozijn from YPR Software for taking the time to share these instructions. You can pick up a copy of their addictive tile Rummy game from http://www.rummigame.com/en/index.php.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>