sabato, 18 aprile 2009

The j2me applications come with a pair of file: a jad and a jar file. The Blackberry devices require application in a particular format: .cod file. Here, we'll describe a fast procedure to obtain a cod file from your midlet.

Before proceed be sure you have installed the Blackberry JDE (downloadable from the Blackberry developer website: download here) and the Java SDK from Sun (download here).

Here you are the steps:
  • Move your JAD and JAR in the bin directory of the JDE installation folder (i.e. c:\program files\Research in Motion\Blackberry JDE 4.7.0\bin\ that will make easier the process from the command line);
  • Open a DOS shell windows, go to the bin directory mentioned before and call the RAPC command: rapc import="c:\Program Files\Research in Motion\Blackberry JDE 4.7.0\lib\net_rim_api.jar" codename=myMidelt -midlet jad=myMidlet.jad myMidlet.jar. Use the name of your application instead of the myMidelt used in the previously written command line
  • Now you have your cod file, use the javaloader (after you have linked your device to the pc through usb cable) to send the application to your phone: javaloader -usb load filename.cod


Did you like the article? Buy me a coffee!

postato da: emanuelepec alle ore 19:12 | Permalink | commenti
categoria:tipsandtricks, j2me, blackberry, application


mercoledì, 26 marzo 2008

When you develop a J2ME application for the BlackBerry you might see that a "Close" command is in the menu even if you never added it.

That's because the operating system of the BlackBerry add this command automatically. To avoid this behaviour you have to add a your command of Command.EXIT type to the screen:

Command myCommand = new Command( "My label", Command.EXIT, 1)

In this way the default command will be replaced by your "My label" command.


Did you like the article? Buy me a coffee!

postato da: emanuelepec alle ore 20:48 | Permalink | commenti
categoria:tipsandtricks, j2me, blackberry


Blogs Directory