Finally Sun J2ME on Windows Mobile

Some days ago I got my new Acer P300. Windows Mobile 6.5.3, QWERTY keyboard; great phone! But after a few clicks I discovered that it doesn't supply a Java Virtual Machine to run J2ME applications. So, I started googling to find a Java Virtual Machine for my phone. After a couple of hours, surfing here and there, following links in forums, blogs, etc., I found some different solutions but after installation on my phone, they don't work as expected. Some of them don't start at all. Some others start but many Java MIDlets doesn't work. Most MIDlets refuse to install and even if you manage to install one, they either do not work or display with some bad resolutions. I was in a hell of JVM!
The following are the ones that seem to work better:

There are a lot of posts over the web about that argument. It's very hard to find the best solution to have a working J2ME on a Windows Mobile phone.
Finally, when I was going to live my search, I discovered that Sun has released JavaFX for Windows Mobile.
JavaFX is a platform to create expressive, feature-rich content for any Java environment and also for J2ME. This means that the JavaFX for Windows Mobile must contains also a J2ME engine. I installed it on my phone and it worked!!
You can download the related files from here:

- CAB: javafx_mobile1.2_windows.zip
- Installation Guide: InstallGuide.pdf.

The packages supported by JavaFX for windows mobile are:
    * PDA Optional Packages for the J2ME Platform (JSR 75)
    * Mobile Information Device Profile (MIDP) 2.1 (JSR 118)
    * Wireless Messaging API (WMA) 1.1 (JSR 120)
    * Mobile Media API (MMAPI) 1.2 (JSR 135)
    * Connected Limited Device Configuration (CLDC) 1.1 (JSR 139)
    * J2ME Web Services Specification (JSR 172)
    * Location API for J2ME (JSR 179)
    * SIP API for J2ME (JSR 180)
    * Java Technology for the Wireless Industry 1.0 (JSR 185)
    * Content Handler API (JSR 211)

Unfortunately there are some minor limitations:
- The JVM can run only one application at a time.
- The JVM is not able to establish a new network connection, however, it is able to reuse a network connection established
by another application.
- Over-the-air (OTA) provisioning is not enabled in this release. Applications can be installed from local storage, or they
can be installed using the NetBeans On Device Tooling feature.
- On the HTC Diamond, the native player and the JVM share the same memory pool. Therefore, if the Java heap is large,
videos might not play smoothly. Setting the Java heap size to 5MB results in reasonable performance from both the JVM
and the native player.
- On the HTC Diamond, when more than one video is played only the first has audio and the rest are silent. To work
around this problem, start the video using xxx_set_video_visible(true) at start time, then after the start, specify
xxx_set_video_visible(true) again.
- On the HTC Diamond, when a key is pressed, the Key Pressed and Key Released events are generated simultaneously.

Finally I can play with my MIDlets on my new phone!!!

Comments (6) -

  • The JVM is not able to establish a new network connection, however, it is able to reuse a network connection established by another application.
  • hi,
    i try using MMAPI at windows mobile 6. but it don't have "video.snapshot.encodings" property.
    can u help me, what property that windows mobile have?

    tq in adavance
  • hi,
    i try using MMAPI at windows mobile 6. but it don't have "video.snapshot.encodings" property.
    can u help me, what property that windows mobile have?

    tq in adavance
  • hi,
    i try using MMAPI at windows mobile 6. but it don't have "video.snapshot.encodings" property.
    can u help me, what property that windows mobile have?

    tq in adavance
  • hi,
    i try using MMAPI at windows mobile 6. but it don't have "video.snapshot.encodings" property.
    can u help me, what property that windows mobile have?

    tq in adavance

Pingbacks and trackbacks (1)+

Add comment