Blackberry Blog

Converting a J2ME MIDlet to a Blackberry cod file

Great post over on the PDA Street Forums that shows how you can convert a J2ME MIDlet (technically just the JAD file) into a cod file and then goes on to illustrate how you can transfer the MIDlet / cod combination from your local PC to your Blackberry while connected using the USB cable. It's not for the faint of heart and really only necessary if you can't deploy / download the application using OTA:

a) Download and install the RIM Java Development Environment

b) Download and install Java 1.4.2 SDK

c) Copy the jad & jar files in question to the /bin/ directory of your RIM JDE installation.

d) From the command line (make sure you are in the RIM JDE installation directory, on my system it is "C:\Program Files\Research In Motion\BlackBerry JDE 3.7\bin") type:

rapc import="c:\program files\research in motion\blackberry JDE 3.7\lib\net_rim_api.jar" codename=$your_app -midlet jad=$your_app.jad $your_app.jar

where $your_app is the name of the MIDlet you're trying to convert, $your_app.jad is the name of the MIDlet descriptor and $your_app.jar is the name of the MIDlet jar file. If all goes well you'll see a couple files produced: $your_app.debug (which you can discard) and $your_app.cod, which is the whole point of this operation. Once you have that, move to:

e) With your Blackberry connected to your computer via USB and from the command line (again make sure you're in the RIM JDE installation directory) type:

javaloader -usb load $your_app.cod

f) At this point you should see the J2ME application in your home screen.

You can also use the directions on Blackberry.com, but they aren't as straightforward and they require the use of the Blackberry JDE.



August 18, 2004 in Code, Tips by ajohnson

Comments

i buy a .cod file from a company and their is no RIM JDE installation in my BB, Then how can i install that applciation.
Please Suggest and send me the installation process

Thanks

Posted by: Arpit on March 8, 2006 2:54 AM

Post a comment

Name:


Email Address:


URL:


Comments:


Security Code:



Remember info?