Comments & Questions

Shameless plug: This FAQ has been the #1 hit on Google for Java PocketPC for about a year.  That's why it's important that you please post comments publicly so other people can have a chance to answer (anonymous is allowed !!).  But if you're too shy for anonymous comments ;-), you can still email me.  Corrections and additions (related info) are also welcome.

About this FAQ

There is a lack of practical publicly available info for Java developers interested in PocketPC software development.  This page is my attempt to collect information in one place to help people get started with J2ME/CDC development, otherwise known as Java on PocketPC.  This FAQ is not affiliated with Sun in any way, which means I can offer practical information about competing JVMs and APIs. If you're reading this as a printout, the latest copy of this FAQ is available from: http://www.vikdavid.com/mobile/

What is J2ME/CDC?

Sun has categorized the Java platform into three camps:

  • Java on servers, or J2EE
  • Java on desktops, or J2SE (also known as "core" Java)
  • Java on mobile devices, or J2ME

The J2ME camp is made up of a lot of APIs further categorized into "Configurations" and "Profiles".  CDC is one of the Configurations, which stands for "Connected Device Configuration".  Sun targets CDC at a broad range of devices. In reality, the CDC is available for real world-use by any developer (not just OEMs) on the PocketPC device, Nokia Series 80 phones, and recently announced Nokia Series 60 phones. 

I haven't gotten my hands on a Series 80 phone yet, but I'm hoping a lot of the info in this FAQ will apply to Series 80 devices, in addition to PocketPC's.  Except, the fact that Series 80 devices come with IBM's J9 JVM pre-installed for free - nice!!.  Oh, and CDC apps will also run on any Java desktop PC or laptop!  I guess that makes J2ME/CDC, "the other Desktop Java".

Read Sun's official CDC faq for more details.

What PocketPC devices are available?

Each issue of Pocket PC Magazine([online]) has a center page with a tabular listing of all available PocketPC devices from HP, Dell, Toshiba, etc with specs on CPU, Storage, Peripherals, etc.  I think its the best "one stop" comparison of PocketPC devices. Alternatively, Microsoft has a listing of devices on the Microsoft PocketPC official site divided by regional availability for Americas, EMEA, and Asia/Pacific. I myself use an HP iPAQ RX3115.

What JVMs are available for PocketPC devices?

This is probably the most popular question and biggest barrier for Java on PocketPC.  The answer is simple: use IBM's J9 JVM or NSICOM's CrEme JVM.  There are several other JVMs on the market, but they all suffer from these problems: not supported anymore (Sun's PersonalJava), not fully Java compatible (SuperWaba), not fully Java compatible (EWE), on sale to OEMs only (Esmertec JBed, formerly Insignia Jeode), or out of date (Insignia Jeode).

The pricing options for IBM's J9 JVM are very good at $5.99/each and discounts for bulk.  If you are an individual developer, this is for you.  NSICOM's Creme JVM has a free trial download, plus they sell a developer license of 40 units for $1000, and also offer discounts for bulk.

IBM J9 can be purchased from Handango for $5.99, and NSICOM Creme can be purchased directly from NSICOM.

Is there a free PocketPC JVM?

A reader of this FAQ alerted me to the Mysaifu JVM which seems to be free.  This was first released on April 16, 2005 so it's very new, and I haven't tried it out yet. Benjamin Brown made an effort to ask Sun about a free PocketPC JVM [Read Java Forum thread here, and related Slashdot article here].  There is a rumor that Sun has a project code named "Captain America" which is a free PocketPC JVM, but cannot release it because the market-demand to support such a product is not there.  With all that said, the IBM J9 JVM is only $6/unit, which is not a bad price. :-)
More information on PocketPC JVM's:

  • Mikko Kontio's Java on PocketPC devices for InformIT Magazine (Oct 22, 2004) [link]
  • Stan Berka's JAVA for PocketPC PDA's (Oct 2004) [link]
  • Dan Fitton, Rod Montrose's summary of Java Support on Pocket PC's [link]
  • Rick Grehan's Deliver Big Functionality on Small Devices (summer 2002) [link]

Where can I get more information on the IBM J9 JVM?

IBM uses a couple of different marketing names for this product.  "J9" is the name of the actual JVM, although I've seen it referred to as "IBM WebSphere Everyplace Micro Environment".  IBM also sells an Eclipse-based IDE called "WebSphere Studio Device Developer" (WSDD) for around $600 that includes IBM J9. 

IBM's Ottawa Software Lab makes IBM WebSphere Everyplace Micro Environment (aka J9 JVM).  You can purchase it directly from Handango for $5.99 per unit.

Update on April 19, 2006: A reader of this FAQ writes, IBM has updates the J9 runtimes for WindowsMobile 2005 with CDC/Foundation/Personal Profile 1.1 . See http://www-128.ibm.com/developerworks/websphere/zones/wireless/weme_eval_runtimes.html

Where can I get more information on the NSICOM Creme JVM?    

NSIcom makes the CrEme JVM for PocketPC devices.  There is a trial download available on the NSICOM website.

Related article: Dec 2001 . Rick Grehan's Get CrEmed for JavaPro Magazine, published Dec 2001; Summary: "CrEme, a descendant of the Java Software Coprocessor from NSIcom, is a Java virtual machine for Windows CE devices that has some clever plumbing".

What happened to the "free" Jeode JVM that came with iPAQs?

Insignia ran into financial trouble and sold Jeode to a Swiss company called Esmertec.  Esmertec already had an OEM-only JVM product called JBed.  You can buy Esmertec Jeode for $49.99 for Dell AXIM or PocketPC 2002 devices.  I have not used this product after Esmertec bought it, but be careful, the sale page seems to mention "PersonalJava" compatibility, which is the older pre-J2ME/CDC spec.  It's also much more expensive than either J9 or Creme.

What books are available for Java on PocketPC?

There are a LOT of books that claim to cover J2ME.  However, they usually cover only cLdc/Midlets and not CDC/PocketPC.  Here are a couple that I found useful:

 

What blogs/forums are relevant for Java on PocketPC?

There are no specific blogs dedicated to this topic, but there are some general J2ME related blogs:

Is there an IDE for Java on PocketPC development?

There are several IDEs that claim to be J2ME-aware.  But my experience is that they only include functionality for Midlets, or J2ME/cLdc.  Not for J2ME/CDC.  However, the good news is that since J2ME/CDC APIs are so close to regular desktop Java (J2SE) APIs, you can get away with using your regular Java IDE!

Update on May 5, 2006: A reader sent in this link on Netbeans new CDC/PocketPC support.

What User Interface API should I use?

If you were writing a regular desktop Java application, your options would be AWT, Swing or SWT.  Theoretically, you have the same options available for Java on PocketPC.  I've personally used AWT and know that it works well. If you're thinking about Swing, I'm not sure it's available by default on IBM J9 and NSICOM Creme.  Even if it is, keep in mind that Swing may be less performant than AWT or SWT since it does not use native widgets.  On PC's, this may not be an issue anymore, but since PocketPC's are less powerful devices it's worth taking into consideration.  Read Stan Berka's note [link] and Pat O'Neil's note [link].
The newer SWT API sounds promising.  Check out Christophe Cornu's A Small Cup of SWT (Sep 19, 2003) and Glen Smith's First PocketPC SWT App (Nov 2004).  Also the official SWT site is here [link].  And yet another link: HOWTO run SWT app on PocketPC Emulator

What SQL databases are available?

This is one of CDC's strength's over cLdc/Midlets.  You can use a regular SQL database and program to the JDBC API you're already familiar with.Here is a list of options:

  • PointBase - $$ commercial, pure Java, designed from the ground up for high-performance, small footprint, mobile devices. 
  • Oracle Lite - $$ commercial, native binary for PocketPC.
  • Sybase SQL Anywhere (ASA) and Native Ultralite for Java - $$ commercial, native binary for PocketPC and ative Ultralite for Java.
  • IBM Cloudscape aka Apache Derby - free/open-source, pure Java.  I haven't used this on PocketPC, but it is pure Java with a small footprint, so it should work with J9 or Creme on PocketPC.
  • Microsoft SQL Server CE - I believe this is free if you own a SQL Server license, and I'm not sure if there is a good JDBC driver (not the JDBC-ODBC bridge) for the SQL CE edition.

In addition, there are a lot of embeddable Java databases out there.  Though they don't specifically say they're meant to run on PocketPC-type devices, any database written in Java could theoretically run on your PocketPC JVM.  There is a list of open source Java databases on java-source.net. And a new edition: Daffodil DB.

How should I go about writing and deploying a HelloWorld app?

You can write and compile your app on a desktop like you normally do.  Deploying is "the hard part". Read this message thread as it talks about downloading the right version of J9, compiling/deploying your app, and creating the PocketPC shortcut file to launch it.

Can I run Java Applets on PocketPC?

Yes, I know Esmertec Jeoede JVM comes with a plug-in for Pocket Internet Explorer to view Java Applets on PocketPC.  It's stored in \Windows\iepluginvm.exe.  There is a sample HTML with an applet under: Windows\iexplore.exe \windows\lib\Quasar.html

What is the difference between cLdc/Midlets and CDC/PP?

CDC/PP stands for Connected Device Configuration with Personal Profile.  cLdc/Midlets stand for Connected LIMITED Device Configuration with Midlets.  In a nutshell CDC/PP has a lot more APIs and is geared toward more powerful mobile devices.  Russell Beattie explains the difference in his blog here and here.

Are there any RAD tools for developing business apps?

Yes, a company called mobiforms makes an IDE to create apps which run on IBM J9.  As with all RAD (rapid application development) tools, you have to weigh the pros/cons of using something like this: you gain time-to-market and development ease, but loose the customization of writing your own custom software.

Links to external articles