Troubleshooting guide
A
Appendix: The command line compiler
Using the command line compiler
The BlackBerry® Java™ Development Environment includes RAPC, a command line compiler. RAPC compiles .java
and .jar files into .cod files that you can run in the BlackBerry device simulator or load onto a BlackBerry device.
The rapc.exe file exists in the bin subdirectory of your BlackBerry JDE installation.
RAPC accepts the following command line options in the following order:
Using the command line compiler
Note: net_rim_api.jar is required as an input file when you invoke RAPC. Use the command line argument with the
-import= option to provide this .jar file to RAPC.
Option Option format Description
java | class | jar The input files:
• .java: A Java source program file that javac must compile.
• .class: A Java .class file that javac has compiled.
• .jar: An archive of files that the compilation set must include.
jad An input file that contains application information. For example, it
contains a list of attributes as specified by the MIDP specification.
-class <classname> The name of the class containing the application main entry point;
without this option, RAPC uses the first
main(String[]) method it
finds as the entry point.
-codename =[<path>\[...]]<filename> Specify the name and location of the output .cod file; typically the
output .cod file uses the same name as the .jar file.
-library =[<path>\[...]]<filename> Specify the name and location of the output .cod file as a library.
-import =<file>.jar[;...] List dependent .jar files; for example list RIM APIs and other dependent
libraries.
-midlet Specify the .cod file as a MIDlet and generate a preverified .jar file.
-deprecation The Java compiler ignores the value specified with the -deprecation
option.
-nowarn The Java compiler does not issue warnings for the value specified with
the -nowarn option.
-quiet Display only errors.
-warning Generate warning messages.
-verbose Display information about RAPC activity. RAPC stores this information
in intermediate and temporary files in the BlackBerry device user’s
temporary folder. RAPC does not delete the temporary files.
-wx Treat certain warnings as errors.