recently tested one of my J2ME MIDlet applications on a Sprint Vision handset. Once on the handset, the application ran great and I needed to make only a few changes to the code, but I ran into a few snags before I could even get my MIDlet onto the device.
In this article, I detail some of the bumps I ran into, including Web server configuration and caching problems, and I explain the solutions I used to overcome them. I also discuss Over The Air (OTA) Provisioning on the Sprint PCS network and the Java Application Descriptor's contribution to the provisioning processthis little file can provide useful additions for your application that will enhance the user's experience.
I use simple, readily available tools for development and deployment, so you can take these techniques and apply them to your own development, testing, and deployment processes. Although most of the techniques and advice I provide were applied on a Sprint Vision handset, the majority should be applicable to other J2ME-enabled devices.
MIDlets and MIDlet SuitesThe Java Application Descriptor (JAD)This file tells the Application Management Software (AMS), the piece of software on the hardware responsible for managing J2ME applications, how to handle your application, including installation, identification, and retrieval.
The Java Archive (JAR)This file is a collection of your application's compiled byte classes, resources, and manifest file.
MIDP is a version of the java platform that is aimed at small footprint devices like cellular handsets. Java applications that run on MIDP devices are called MIDlets, and a MIDlet suite is a grouping of MIDlets that can share resources at runtime. A suite is actually comprised of two separate files:
I concentrate on the JAD because this little jewel enables you to do all sorts of cool things. For example, you can:
Specify an information URL for your application
Tell the AMS to associate your application with specific media types or URIs (like HTTP or mailto)
Force your application to be downloaded and categorized into an appropriate folder, like Games or Fun Tools
Even have the phone notify you when an application is successfully installed
You can use development environments like KToolBar or Sun ONE Studio ME to automate the creation and maintenance of the JAD file. (If you use the KToolBar, you eventually have to modify the JAD file manually as some of the techniques in this article cannot be implemented through this tool).
First, I'll demonstrate how to create a simple MIDlet that you can use for practice. This article includes a KToolBar project, which you can just download into the KToolBar "/apps" directory. This MIDlet will help you get your feet wet and figure out how to upload the application onto a phone before you try out any of the cooler features the JAD offers.