Skip navigation.
Home

phoneME for Windows CE/Mobile

phoneME for Windows CE, PocketPC and Windows Mobile is an implementation of the phoneME open source J2ME application platform for your Windows Mobile phone or handheld device. This website provides precompiled binaries of phoneME Feature and phoneME Advanced for WinCE based operating systems (including PocketPC 2002, Windows Mobile 2003 and Windows Mobile 5/6.x). See the screenshots below.

phoneME Feature targets the low-end range of Windows Mobile devices and allows you to run CLDC and MIDP based applications, i.e. midlets. Currently, many optional JSRs have not been ported to the WinCE platform and are hence unsupported.

phoneME Advanced allows you to run applications that are compatible with a subset of the J2SE 1.4 stack. Builds for the CDC, the Foundation Profile and Personal Profile are available. phoneME Advanced also provides a dual stack implementation with MIDP support to run midlets, but as with phoneME Feature, JSR support is rather limited.

More information about the phoneME project and these two types of virtual machines can be found at https://java.net/projects/phoneme.

License

The phoneME software is copyright (c) 1990-2011 by Sun Microsystems, Inc. (now Oracle) and licensed under the GNU General Public License (GPL) version 2. The builds for WinCE based operating systems on this site are based on the phoneME software and includes code copyright (c) 2007-2011 by Davy Preuveneers released under the same GPLv2 license. More details about the changes made to the original code are available on this site.

Run phoneME Feature

The CLDC and MIDP implementation of phoneME Feature seem to run fine to some extent. phoneME Feature needs to know where to find the appdb and lib folders. If you are getting errors, copy these folders either to \Storage Card or \My Documents\java. The easiest way to install midlets at the moment is to run runMidlet.exe in the bin\arm subfolder. This will start the MVMManager application manager.



This application allows you to install new midlets over the air (OTA) by clicking on "Install Application", providing a url to a web page containing links to JAD files, and selecting the midlet you want. The application will download the midlet, verify it and install it for you. After installation, you can easily access the midlet through the menu interface of the MVMManager application manager.

Another approach to running a midlet without installing it is to run it directly through a startup file, e.g. myapp.lnk, with the following content:

255#"\phoneme\midp\bin\arm\runMidlet.exe" -classpathext "\midlets\App.jar" "\midlets\App.jad" MyApp

You may need to change the path names to the binaries and midlet.

Run phoneME Advanced

Create a startup file, e.g. myapp.lnk, with the following content:

255#"\phoneme\personal\bin\cvm.exe" -cp "\phoneme\app" MyApp

You can try out a simple AWT HelloWorld program. You may need to modify the hello.lnk file to correct the location of the cvm and the class path. The phoneME Advanced builds for Windows Mobile 2003 should work for Windows CE if you have a working AYGSHELL.DLL and GX.DLL installed on your device.

There are several applications you can try to run:

  • HelloWorld: cvm.exe -cp democlasses.jar cdc.HelloWorld
  • Test: cvm.exe -cp testclasses.zip Test
  • DemoFrame: cvm.exe -cp democlasses.jar personal.DemoFrame (only works with Personal Profile)

The first two are console applications that print messages on the standard input/output streams. If you do not see anything printed, it is quite likely you do not have a shell or command prompt installed. If so, install the PPC Command Shell from the Microsoft Windows Mobile Developer Toys. For devices with Windows Mobile 5 and higher, you also need to change the registry to enable the console output. You can use PHM Registry Editor to change the value of HKEY_LOCAL_MACHINE\Drivers\Console\OutputTo to 0.

Note: Current builds have their own console support, so you should no longer install external tools or tweak the registry to see console output.

With the same editor you can set HKEY_LOCAL_MACHINE\Security\Policies\Policies\0000101a to 1 to disable warnings about installing or running programs from an "unknown publisher".

Run MIDP midlets on phoneME Advanced

Also available are binaries with the dual stack version of pMEA. With this build, you can run regular pMEA Foundation Profile applications, as well as MIDP midlets. To run midlets, you need to create two different files, a startup script and a text file. Create a startup file, e.g. myapp.lnk, with the following content:

255#"\phoneme\dual\bin\cvm.exe" -f "\midlets\App.txt"

and a text file, here \midlets\App.txt, with all the command line arguments (put everything on one line):

-Xmx2m -Dmicroedition.profiles=MIDP-2.1 -Dsun.midp.library.name=midp
"-Dsun.boot.class.path=\phoneme\dual\lib\btclasses.zip"
"-Dsun.midp.home.path=\phoneme\dual\midp\midp_wince"
-Dcom.sun.midp.mainClass.name=com.sun.midp.main.CdcMIDletSuiteLoader
sun.misc.MIDPLauncher -midppath "\phoneme\dual\midp\midp_wince\classes"
-suitepath "\midlets\App.jar" -1 MyApp

Again, you may need to change the path names to the binaries and midlet.

Howto Build

1. Install your tool chain

Install your build environment including:

  • J2SDK 1.4.2: Best not use JDK 1.5 or higher
  • Cygwin: make, bison, flex, gcc, g++, diffutils, subversion, ... (for phoneME Advanced)
  • Cyg4Me: modified Cygwin for phoneME Feature
  • Microsoft Visual Studio 2005 (Windows Mobile 5)
  • Microsoft Embedded Visual C++ 4 with SP4 (Windows Mobile 2003) or Microsoft Embedded Visual Tools 3 (PocketPC 2002)
  • Platform SDK
  • Microsoft Macro Assembler (MASM)
  • Windows Mobile 2003 or Windows Mobile 5 SDKs.

2. Download the sources and the patches

Check out the most recent version of phoneME with subversion from https://phoneme.dev.java.net/svn/phoneme/ using the following shell script:

#!/bin/bash
mkdir -p c:/phoneme
cd c:/phoneme

svn checkout https://svn.java.net/svn/phoneme~svn/legal legal --username guest
for i in javacall pcsl cldc midp cdc tools jpeg jump abstractions xmlparser restricted_crypto; do
      svn checkout https://svn.java.net/svn/phoneme~svn/components/$i/trunk $i --username guest
done

This script assumes you are checking the sources on a Linux host or that you have installed either Cygwin or Cyg4me with the binaries
accessible from your PATH environment variable.

Important Note: If you want to build phoneME Feature, and you are having POSIX related build issues for the 'file' layer of PCSL, you may wish to download the implementation that uses the Win32 API. Just copy the GNUmakefile, pcsl_dir_win32.c and pcsl_win32.c files from the following branch into your pcsl/file/win32 directory:
https://phoneme.dev.java.net/source/browse/phoneme/components/pcsl/branc...

All my patches are available in the Patches section. Some of them may be out of date or only useful for testing purposes. Others may conflict with one another because they change the same file or only work for one particular profile, platform or compiler. You do not need to download all the patches, only the ones for the specific platform (Feature or Advanced) you wish to build. See below.

3. Platform specific instructions

Follow the detailed instructions for either phoneME Feature or phoneME Advanced depending on what type of virtual machine you want to build:


Screenshots

Here are some screenshots of a small HelloWorld application on a Windows CE 5.0 emulator for ARM running the CLDC implementation of phoneME Feature. The smaller screenshots show some midlet examples and the LWUIT demo, the Jamtris Tetris-clone game, and the Operi Mini 4.1 browser on a Windows Mobile 6 device running the MIDP implementation.


The ubiquitous "Hello World" world application with CLDC on a WinCE 5.0 system

 
Some midlets with basic MIDP widgets on Windows Mobile 6


The LWUIT demo application


The Jamtris Tetris-clone game

 
The Operi Mini 4.1 browser

Here are some screenshots of the demo application of phoneME Advanced. These screenshots were taken on a Windows Mobile 6 device.

  
  

The Personal Profile test application from phoneME's democlasses.jar running on Windows Mobile 6