Keytool and jarsigner tool

user469999 picture user469999 · Nov 26, 2010 · Viewed 19.7k times · Source

I have developed a blackberry application which I have loaded in the BB device. But as we know, without signing the application with RIM we can't run the application on the device. Is there any way which I can create the trial version of my application for some days and run it in the device for testing purposes.

I have heard about the "keytool" and "jarsigner" tools. Can this tools help me to run my application in device without signing the application? If yes, please give me the steps regarding how it can be done.

Answer

user2106541 picture user2106541 · Feb 25, 2013

The steps to sign a java archive (.jar file).

  1. First create the public key with keytool program:
    keytool -genkey -alias <alias name> -keystore <key file> (http://docs.oracle.com/javase/6/docs/technotes/tools/solaris/keytool.html).

  2. Then sign the java archive package:
    jarsigner -keystore <key file> -storepass <password 1 from steps before> -keypass <password 2 from steps before> -sigfile <the name of files .DSA .SF> -certs <java archive file name> <alias name> (http://docs.oracle.com/javase/6/docs/technotes/tools/solaris/jarsigner.html).