Sun Microsystems J2ME Tool Storage User Manual


 
Appendix B Command Line Reference 111
B.5.2 Signing MIDlet Suites
JadTool is a command-line interface for signing MIDlet suites using public key
cryptography according to the MIDP 2.0 specification. Signing a MIDlet suite is the
process of adding the signer certificates and the digital signature of the JAR file to
a JAD file.
JadTool only uses certificates and keys from J2SE keystores. J2SE provides
keytool, the command-line tool to manage J2SE keystores.
JadTool is packaged in a JAR file. To run it, open a command prompt, change the
current directory to {toolkit}\bin, and enter the following command:
java -jar JADTool.jar <command>
The commands are as follows:
-help
Print the usage instructions for JADTool.
-addcert -keystore <keystore> -alias <alias> -storepass <password>
[-certnum <number>] [-chainnum <number>] -inputjad <input_jadfile> -
outputjad <output_jadfile>
Add the certificate of the key pair from the given keystore to the JAD file. The
default keystore is {toolkit}\appdb\_main.ks.
-addjarsig -jarfile <jarfile> -keystore <keystore> -alias <alias>-
storepass <password> -keypass <password> -inputjad <input_jadfile> -
outputjad <output_jadfile>
Add the digital signature of the given JAR file to the specified JAD file. The
default value for -jarfile is the MIDlet-Jar-URL property in the JAD file.
The default ME keystore is {toolkit}\appdb\_main.ks.
-showcert [([-certnum <number>] [-chainnum <number >]) |-all [-
encoding <encoding>] -inputjad <filename>
Display the list of certificates in the given JAD file.
The default value for:
-encoding is UTF-8
-jarfile is the MIDlet-Jar-URL property in the JAD
-keystore is %HOMEPATH%\.keystore
-certnum is 1
-chainnum is 1