Wednesday, November 14, 2007

Java Mobile Where We Stand Tomorrow

Currently Java on mobile devices is sort of a mess, while J2ME is available on a huge number of devices it lacks the feature set Java developers expect from J2SE. Given any particular mobile phone a developer will find a sub set of features available, not to mention questionable quality and user experience.

For example, I own a Cingular 8125, a Windows Mobile 5 Device. It contains a very capable processor, however in traditional MS style, Java is a second class citizen at best. Each Java application I install is only accessible by first launching an application manager. In contrast, if I install a native application it is available under the programs folder, next to the pre-installed applications. This reminds users they are using a non-native application and smears mud on the face of Java.

The real advantage of using Java over other languages and platforms is the JVM. A fully compliant JVM provides an incredible number of features to a Java developer. This list of features is even larger if you consider the huge number of open source libraries that target the JVM. Making these features available to the mobile developer will prower the coming mobile renaissance.

Those looking at Google's Android might be disappointed to find that the VM provided is not a J2SE compliant VM. Android as it stands now looks more like a mobile phone OS which can be extended easily and openly. The framework provided directly addresses the issue I have with my phone, applications written for Android have the same level of access as every other application and they are presented in exactly the same way. It is almost irrelevant that Java is used at all since code written to Android will not be terrible useful on other devices. This is due to the fact that the VM on Android is a subset of J2SE and is not a subset that maps to J2ME. Additionally Android contains mobile specific APIs found on no other device. It is a new J2ME at this point with an unknown audience. Is it cool that there is a new open source phone OS which is easy to develop for? Absolutely, but it does follow the old "write once, run everywhere" philosophy.

Enter Sun's Java FX Mobile which is approximately a J2SE stack targeting the next generation of mobile devices. I say approximately because we don't exactly which libraries will be available in Java FX Mobile. Will CORBA be included, let's hope so. Lets hope it is a full J2SE+J2ME implementation. With any luck the growing modular JVM movement will influence Java FX Mobile, allowing features to be added as required. I guess there is no reason why a large number of standard packages could not be broken out as jars...want swing? use javax.swing.jar.

We have not seen any devices running either of these two Java implementations. It is unclear how wide spread these two technologies will become. Of course there is the iPhone and some believe Java will be available there as well. You can bet your shorts that it will not inter operate with either of the above technologies. Of course a huge number of embedded devices exits that can run Linux and at least some flavor of Java, like the new Bug Lab's Lego embedded system.

Even though Java is fragmenting (or is fragmented) in the mobile space, at least as a Java developer I can use the language and tools I am most familiar with to develop applications on an ever growing number of devices. And thats cool!