J2ME: Has Its Time Finally Arrived?
By Eric Giguere
java.sys-con.com
January 5, 2005
Having written about Java 2 Micro Edition (J2ME) programming for almost five years now, I've been frustrated by the slow adoption of the J2ME platform, as have many of the early devotees. Those of us who saw Sun demonstrate Java running on Palm OS back in 1999 were hoping that the wireless Java revolution was just around the corner. The introduction of J2ME generated a lot of hype and excitement (and confusion) in the Java development community. Publishers rushed books to market, virtual machines were announced, and device manufacturers started incorporating Java technology into their plans. But the corner we wanted to turn was in fact a long way off. I think we're finally approaching it, though.
Writing a J2ME application isn't really that hard. J2ME is, after all, just Java, albeit with a few restrictions. The development process is the same except for a couple of additional steps. If you're an experienced Java developer, you can write J2ME applications. The plethora of acronyms will probably confuse you at first, but there's nothing radical to learn - just new application programming interfaces (APIs). If there's one thing J2ME is good at, it's defining new APIs!
No, the hardest part of J2ME development is getting your application to work within the constraints imposed by real devices. Note that here we're mostly talking about mobile phones - the primary target for J2ME applications today, even though J2ME is about more than mobile phones. Unlike simulators, devices have memory and processor speed limitations that can cripple you in unexpected ways. You may be a good Java coder, but how much of an application can you cram into 64K (or less) of memory? What's worse, all the useful classes you'd expect to find in a modern J2SE implementation are mostly missing. As you can imagine, code size reduction tools and techniques are always hot topics of discussion among J2ME developers.
Another problem with J2ME development is that buggy Java environments have been deployed to various devices. Developers are constantly tripping over bugs with the Java virtual machine and the Java application management subsystem. The manufacturers release firmware updates with bug fixes, but how realistic is it to expect the average consumer to know enough to upgrade their phone? Instead they'll try to run an application, see the application crash or hang, and give up. It's a no-win situation for the developer.
We may be turning the corner. It's been long enough now for J2ME standards to mature enough to include some important features and capabilities that were previously missing. Manufacturers are working on releasing higher-quality implementations of those standards. Minimum standards for what a mobile phone should include in terms of J2ME capabilities have also been defined in another standard known as Java Technology for the Wireless Industry (JTWI). These are all simplifying life for J2ME developers.
Just as important, a critical mass of devices is now out in the field. Again, we're talking mobile phones here - PDAs running Palm OS or Pocket PC just aren't a viable market for J2ME development as of yet, because they have alternative programming tools and languages and generally more open platforms. The only exception to this would be the BlackBerry wireless handheld, which is actually a J2ME-based device.
With most of the new handsets being produced supporting either JTWI or else its key component - version 2 of the Mobile Information Device Profile (MIDP) - developers have a more consistent and capable platform to use for application development. There are still problems that need to be addressed with application testing and deployment, but I think J2ME's time to shine is almost here. Finally!
Copyright 2005