Thursday, January 14, 2010

MicroEmulator 2.0.4 has been released

New MicroEmulator version has been just released. This is mostly a bug fix release, all users of older versions are encouraged to perform an update. Here is a direct link to download MicroEmulator 2.0.4

Most of new features development is happening in our development branch since beginning of 2009. Those features are supposed to be released in 3.0 version. More information about that will be published soon. Stay tuned.

Wednesday, November 25, 2009

Converting JavaME applications to the Android platform (revisited)

It's been a year since I posted tutorial how to automatically convert Java ME MIDlets to Android platform. Since then, a lot of work has been done to make this tool even better and support more and more different Java ME applications and games. I've got a lot of positive feedback as well which also helped improving quality of this project.

Now, it is much simpler to set up MIDlet details, since only jad location and resulting apk package file name is necessary to provide in configuration.

For this demonstration procedure, I took a popular Java ME game 5ud0ku.






Required third party software:
- Java SE JDK (http://java.sun.com/javase/)
- Subversion client (http://subversion.tigris.org)
- Maven http://maven.apache.org/
- Ant (http://ant.apache.org/)
- Android SDK version 1.5 or later (http://developer.android.com/)
- ASM (http://asm.ow2.org/)

1. Check out MicroEmulator from Subversion repository (revision 2211)


svn co http://microemu.googlecode.com/svn/trunk/microemulator microemulator -r 2211


2. Build MicroEmulator project using Maven


cd microemulator
mvn


3. Make sure that the following properties in microemu-android/build.xml correctly point to the Android SDK and ASM jar file


<property name="sdk-folder" value="\java\android-sdk-windows"/>
<property name="asm.jar" value="\java\asm-3.2\lib\asm-3.2.jar"/>


4. Configure properties for 5ud0ku game, edit microemu-android/build.xml file (before you have to download 5ud0ku.jad and 5ud0ku.jar files to the same folder)


<property name="midlet.jad" value="\java\5ud0ku.jad"/>
<property name="midlet.package" value="5ud0ku.apk"/>


5. Create Android apk package with Ant


cd microemu-android
ant


6. And finally deploy microemu-android/bin/5ud0ku.apk either on emulator or device. For all of you who don't want to go through this somehow long procedure, here it is already prepared 5ud0ku.apk package.

Wednesday, November 11, 2009

Project hosting migrated to Google Code

I've been planning to do this for a long time, but finally got motivated enough to move on. Subversion repository is so slow these days on the SourceForge, not mention the really bad usability of the web site. That's a bit sad, because 8 years ago when MicroEmulator has started, SourceForge was a great place to host an open source project. SourceForge has not evaluated much since then, mostly reworking only web UI. In a meanwhile many alternatives has appeared and I finally decided to go with Google Code. It is simple, popular, has fast Subversion repository access.

MicroEmulator project is hosted now at the http://code.google.com/p/microemu/. New SVN URL is https://microemu.googlecode.com/svn.

Unfortunately, a fresh checkout of working copy is needed for existing working copies that are linked to SourceForge SVN repository.

To checkout microemulator trunk working copy use:
svn checkout http://microemu.googlecode.com/svn/trunk/microemulator microemulator

Saturday, May 16, 2009

LWUIT running on Android

This time I'd like to show how advanced Java ME applications can be easily converted to the Android. As an example I took LWUIT Demo and below here it is video that I captured from the emulator. For conversion I followed almost the same process as it was previously described in Running Java ME applications on Android article.

Similar work has already been done for iPhone, but only for that jailbroken ones. More information is available here.

Thursday, December 4, 2008

MicroEmulator coming to the iPhone

Recently MicroEmulator have got significant contribution from Markus Heberling. I'm very happy to see iPhone as the next platform supported by the MicroEmulator. The only sad thing is that Java ME code can be run only on the jailbroken devices since Apple clearly states “no interpreted code allowed” in the iPhone SDK EULA.

This code is mostly based on the Android port. It's running on JamVM with the class libraries from the GNU Classpath project. Additionally JocStrap is used for the ObjetiveC-Bindings for the high level Views and straptease http://code.google.com/p/straptease/ is used for the native CoreGraphics access for the IPhoneDisplayGraphics implementation.

Original information about this port can be seen on Markus blog.

Tuesday, November 4, 2008

Running Java ME applications on Android

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:

1. Check out MicroEmulator from SVN repository

svn co https://microemulator.svn.sourceforge.net/svnroot/microemulator/trunk/microemulator microemulator -r 1997


2. Build MicroEmulator project using Maven

cd microemulator
mvn


3. Make sure that the following properties in microemu-android/build.xml correctly point to the Android SDK and ASM jar file

<property name="sdk-folder" value="$HOME/android-sdk-linux_x86-1.0_r1"/>
<property name="asm.jar" value="$HOME/asm/asm-3.1.jar"/>


4. Configure properties for 5ud0ku game, edit microemu-android/build.xml file (before you have to save 5ud0ku.jar in microemulator folder)

<property name="midlet.name" value="5ud0ku"/>
<property name="midlet.package" value="5ud0ku.apk"/>
<property name="midlet.icon" value="bin/assets/5ud0ku-icon.png"/>
<property name="midlet.class" value="de.wintermute.sudoku.SudokuMidlet"/>
<property name="midlet.jar" value="../5ud0ku.jar"/>


5. Create Android apk package with Ant

cd microemu-android
ant


6. And finally deploy microemu-android/bin/5ud0ku.apk on emulator or G1 phone. For all of you who don't want to go through this somehow long procedure, here it is already prepared 5ud0ku.apk package.

UPDATE svn checkout command now include revision number

UPDATE Conversion manual has been updated, it is presented in Converting JavaME applications to the Android platform (revisited)