Tuesday, November 4, 2008

Each new software platform, including Android, at the beginning is struggling with a small number of the available applications. This is why Google spent $10 million trying to attract developers to their Android Developer Challenge before G1 phone release. Taking advantage of an opportunity to run large number of existing Java ME applications may determine a significant value for the Android platform. This is also occasion for developers to reduce cost preparing mobile software for a smaller number of platforms at the same time. MicroEmulator, which is pure Java implementation of Java ME API's in Java SE, seems to be very well suited for the Android. Last few months I've been working extending MicroEmulator to be an executable environment to run Java ME applications on that platform. Here are results of my work with demonstration of popular Java ME game 5ud0ku automatically translated to the Android.

These are screenshots of 5ud0ku running side by side on emulators: Java ME and Android.

Works to complete the effort are not finished yet, but I hope a lot of existing Java ME applications can be already transformed to Android. At the moment code is only available in SVN repository. For anyone interested, here is the short manual how to convert 5ud0ku yourself:

I have just done all of this for an application I created. On the first screen, I have a form, Login, two TextFields, one for username, one for password. This all work wonderfully within sun WTK2.5.2. and 3.0 When turn my application into a .apk and I run my application through the emulator, the name of the form (i.e. Login) appears at the top followed by:

Regarding problems with mchessgodtry application, there should be more information in the emulator logs. What's a error on the console when emulator is running with "-logcat MicroEmulator" command line option.

This is broken with android SDK 1.5.It doesn't even compile (my version is android-sdk-linux_x86-1.5_r1 on ubuntu 8.10).Maven compiles the project, but compiling any MIDlet fails on compiling the source from microemulator-android. Android APIs changed ... :-(

svn co https://microemulator.svn.sourceforge.net/svnroot/microemulator/trunk/microemulator microemulator -r 1997 "I didnt find this in the svn" kind could anyone help me regarding this i have an application compiled using j2me (which is in .jar format) i need to convert it into .apk to run on android based mobile.

hi Bartek Teodorczyk, you are right i dont have that folder aapt folder under android sdk, i have downloaded from android offical website ie "http://developer.android.com/sdk/1.5_r3/index.html" for windows when i unzipped i didnt find any files.COuld you please help me out with this

Bartek,I have a question, do you think it would be possible to integrate 3rd party Android library for ads (for example Greystripe or AdMob) into converted midlet? If yes, how can I add a jar library to the project (I am using Ant for building)?

Of course I can help you. For easier communication I encourage to use the following channels:- open source projects: http://groups.google.com/group/microemulator-support- commercial projects: info@microemu.com

I've converted my j2me app to apk and when I try to run it on android emulator a null pointer exception is thrown.

At first I thought that some resource was not found because they were moved to assets folder while on my original application they are at the root on jar. I don't use subdirectories.

Looking at the log file it seems that the one of my classes was not found. This class is named Resource.

My app uses this class to load strings and images from jar. All methods and attributes are static.

I've generated the apk file without signature then I moved resources out of assets folder, manually signed the package but the problem persist exactly the same.

Could you give some insights to help solve my problem?

I don't know if these information are useful or not but- if I use netmind the converted application works fine.]- The apk file generated by netmind keep all resources in the file root.- The jar used send to netmind was obfuscated.

I believe running java apps on Android is interesting but as well as interesting as running Android from an applet the sealed java android classes can be recursivly wrapped and emulated the preripherals then exposed tanks to creation of public methods and properties Android OS final libraries so can be executed code via javascript with an getWindow(..) createObject(..) and eval(..) so ie can be run all android software even java mobile apps in facebook or from any web page

Its interesting the fact of trying to load java apps from android but its also interesting the fact of running Android on an java Applet wrapping recursivly libraries needed then to be exposed by the Applet so can be executed via javascript through an getWindow(..) createObject(..) eval(..) thus it will be possible to run Android apps/games in any webpage or as a facebook app/game

i made a lwuit midlet and built it following the steps and it crashes at start.5ud0ku and the simple demo run fine nut i also made a simple hello world with the lcdui which adds text from a textfield to the form and it always crashes after the second press?Any ideas on how to fix it?