Java drama! Gossip! Excitement! All here! Got a juicy tidbit that you think should go in Java To Go? E-mail me at firstname.lastname@example.org, or contact me on Twitter as jfruh!
The connection between Android and the Java platform isn't exactly in your face all the time, but it isn't exactly a secret, either. If you're reading this blog, you almost certainly know, already, but: Android applications are for the most part written in Java SE and compiled to bytecode to run on the Dalvik Virtual Machine, which is a modified JVM. There are tweaks you have to make to your Java code to get it to run on Android, but that's frankly true of just about any platform you can make if you want to make your Java experience a seamless one. One of the major selling points of the Android platform in the first place was that it would immediately have a deep community of Java developers who could start churning out Android-native code from the get-go -- unlike, say, the case with the iPhone, for which they'd have to resort to transcoding kludges that would transform Java into Objective-C.
Of course, there are tweaks you need to make to your Java code to get it running on Android, especially if you've written a MIDlet or something else aimed at Java ME. Still, the porting process ought to be relatively simple, right? Probably, but hey, why not just use some kludgy transcoding process instead? That's what mysterious Swiss outfit Myriad is offering with its J2Android tool, which converts MIDlet apps into the .dex bytecode files that run on the Dalvik VM; the apps are apparently modified in the process to better match up with the target device's screen size and soft keyboard features.
Now, charitably, you could say that this product shows off just how far transcoding's come -- that this tool can do the minor intra-Java tweaking for you more easily and efficiently than you can yourself. It may also be a sign of just how many intra-Java gaps there are, or how far Dalvik, in the absence of any attempt to get the official Sun/Oracle seal of approval and Java trademark rights, has wandered off the reservation. On the other hand, you might think this is kind of a scam aimed at developers who don't really understand the nature of the platform they're targeting. My biggest complaint is that you'd think that Mikael Ricknäs, the IDG News Service reporter who wrote the first story linked to above (who toils for the same company that publishes JavaWorld), would have at least mentioned the relationship between Java and Android to make the oddness of this announcement clear.
Myriad has certainly taken an interest in Dalvik generally: last month they released an entirely rebuilt version of the VM, christened Dalvik Turbo, that they claim is 100 percent compatible with code written for Google's Dalvik VM -- and is three times faster. They're supposedly trying to woo phone manufacturers into using it as the basis of new Android phones.