You can download both standard MIDlets and BlackBerry-specific applications applications over the air, wirelessly. The provider puts up on a server both a .jad
file to describe the application, and either a .cod
or a .jar
file holding the application itself. To download, you select the .jad
file from a browser.
To enable you to download standard MIDlets to a BlackBerry, the Mobile Data Service feature of the BES provides a built-in transcoder that converts .jar
files into .cod
files. Note that the web server must identify the MIME types for .jad
and .cod
files, text/vnd.sun.j2me.app-descriptor
and application/vnd.rim.cod
respectively.
Be aware that you can download a .jar
file to a BlackBerry only if the MDS feature is enabled, so it can convert the file to .cod
format. If your access to the network is through a WAP gateway, you can download only .cod
files.
RIM's BlackBerry handheld devices are becoming quite popular for both data and voice, and wireless carriers all over the world are distributing them. Several BlackBerry devices are Java-enabled, supporting CLDC and MIDP, while also providing API extensions for BlackBerry-specific features. The BlackBerry Java Development Environment enables developers to create CLDC-based, BlackBerry-specific applications that will run only on a BlackBerry, as well as standard MIDlets that will run on any MIDP-enabled device, including those bearing the BlackBerry brand.
This article provided an overview of the BlackBerry architecture, and a tutorial on developing J2ME applications for the BlackBerry. The sample code gave a flavor of the CLDC-based BlackBerry programming style. The article described how to load existing standard MIDlets into a BlackBerry, as well as how to download applications over the air.
- J2ME
- Research In Motion (RIM)
- BlackBerry Java Development Environment (JDE)
- BlackBerry Developer Journal
- A comparison of BlackBerry Devices
- BlackBerry ISV (Independent Software Vendor) Alliance Program
- BlackBerry Forums
- BlackBerry Solutions from Nextel
- BlackBerry Solutions from Telus Mobility
- T-Mobile BlackBerry Service Plans
Thanks to RIM and Telus Mobility for lending me the devices I used to deploy, run, and test Java applications for this article. Also, special thanks to Roger Riggs of Sun Microsystems, whose feedback helped me improve this article.
Qusay H. Mahmoud provides Java technology consulting and training services. He has published dozens of Java articles, and is the author of Distributed Programming with Java (Manning Publications, 1999) and Learning Wireless Java (O'Reilly, 2002).
1As used in this document, the terms "Java virtual machine" or "JVM" mean a virtual machine for the Java platform.