Tuesday, June 9, 2009

Generating .COD files using RAPC Compiler

If the application is built in Java ME Platform SDK, it does not provide options for generating the .cod / .alx files.

If you want to generate .COD files using command line using the RAPC compiler first you need to have RAPC executable on your machines.

RAPC is the command line compiler which is used to compile .java files into .cod files. c.

RAPC takes in a number of arguments from the command line and can be linked to the JDE compiler. It takes in either .java source files or a .jar file, compiles them, and then creates a compressed .cod file, which the BlackBerry handheld can run.

Copy the 2 files (.jad and .jar) to the directory where rapc.exe is present.

Generate the .cod file using the following command in the command line under the RAPC executable installed directory

C:\Program Files\Research In Motion\BlackBerry JDE 4.7.0\bin>rapc.exe import="C:\Program Files\Research In Motion\BlackBerry JDE 4.7.0\lib\net_rim_api.jar" codename= -midlet jad=.jad .jar

The above command generates .cod file in the bin folder of the BlackBerry JDE

No comments:

Post a Comment