J2ME Polish
J2ME Polish 2.4 Documentation
Enough Software

Developing for Windows Phone Devices

With J2ME Polish you can either create Java ME applications for Windows Phone Classic (formerly Windows Mobile) handsets or convert your application into a native Windows Mobile executable.

Windows Phone

The new Windows Phone platform breaks compatibility with the old Windows Mobile operating system. It also features a slick but minimalist user interface that uses unique elements and usage patterns. Therefore it does not make sense in our opinion to port apps automatically over to Windows Phone. Instead we offer manual Windows Phone porting services. During this service we can port the business logic of your application automatically to Windows Phone using our internal Java to C# cross compilation technology. If you are interested in this service please send an email to services@enough.de.

Creating Java Applications For Windows Mobile

You can create your application for Windows Mobile devices with a Java Virtual Machine (JVM) normally like for any other device. If you want to create a generic version for all Windows Mobile phones you can target the Native/WindowsMobile phone in your <deviceRequirements> section.

Since there are different JVMs available for Windows Mobile, J2ME Polish cannot create device optimized versions for some of the device features like soft key values. We recommend, therefore, to turn off the rendering of the commands menu and the direct input mode of TextFields for Windows Mobile devices by specifying some conditional variables in your build.xml file:

<variable name="polish.FullScreen" value="false" if="${ isOS( Windows ) }" />
<variable name="polish.TextField.useDirectInput" value="true" unless="polish.hasPointerEvents or isOS(Windows)"/>

Note that some Java Virtual Machines/MIDlet Managers require an absolute MIDlet-Jar-URL within the JAD file so that the application can be installed correctly via OTA.

Porting Your Mobile Java Application Into A Native Windows Mobile Application

In the near future you will be able to port your application into a native Windows Mobile application automatically with a commercial J2ME Polish extension. Apply now for reduced rates while we are improving the commercial viability of this solution by sending an email to services@enough.de!


Running Java applications on Windows MobileTM platforms provides a suboptimal user experience. For ensuring a seamless integration into the Windows Mobile environment, best performance and an optimal user experience, a native application is necessary. The J2ME PolishTM Native Windows Mobile Extensions translate mobile Java applications into native executables that require no installed Java Virtual Machine and run with a blazingly fast graphics support. This allows you to leverage existing mobile Java applications and port them unmodified and fully automated to native Windows Mobile applications.


Running mobile Java applications on Windows Mobile platforms is possible, but it has various drawbacks:

  • The user needs to purchase and install a Java Virtual Machine (JVM). Sometimes this is done by the carrier or the device manufacturer as well.
  • There are various JVMs available for Windows Mobile, so you cannot know which JVM your user has installed. This means that you cannot optimize your application for a specific JVM. Softbuttons, which are not defined within the mobile Java standard, are mapped to different keys, for example.
  • Most JVMs do not support all options for lowlevel LCDUI usage - often keys like the typical "back/delete" key do not trigger events but close the application without allowing the programmer to prevent this.
  • Often the performance of JVMs results in considerably slower applications than native ones.
  • You can launch Java applications only by first launching the MIDlet Manager of the installed JVM. Your application is not a first class citizen available directly within the start menu.
  • Last but not least you also need to launch the MIDlet Manager for deinstalling your application.

These reasons accumulate to a poor user experience for mobile Java applications on Windows Mobile phones.

Porting Technology

The automated porting is realized by transcoding your Java source code into C# source code. It is then compiled and linked with a MIDP wrapper API. This optimized wrapper provides mobile Java functionality to Windows Mobile applications and uses high performance graphics, which is even faster than the graphics of the .NET Compact Framework. The complete application is than bundled into a CAB installer. This also allows your users to install the application using Microsoft's Active Sync/Windows Mobile Device Center(tm).

Supported Java Technologies

You can access the full MIDP 2.0 functionality set with our native Windows Mobile technology with the exception of high level user interface components like Form or List. We recommend the usage of the low level user interface API or using the J2ME Polish UI for realizing your user interface.
Adding support for further libraries is possible.

Accessing Advanced Windows Mobile APIs From Within Java Applications

You can access all functions of the .NET Compact Framework from within your Java application. A corresponding Java library is delivered as part of the porter.

Please send inquiries to services@enough.de.

back to top