Rotating Banners.

Home >>> Introductions

Introduction to Java ME (J2ME)

There is nothing cooler in the world than creating an application and seeing it run on normal, everyday consumer devices. I'm a server-side developer, but I can tell you now that seeing my creations running on normal cellphones and getting oooohhs and ahhss from my friends and relatives beats deploying Java EE webapps onto web containers anytime!

The fact that you are reading this now may mean that you are curious about this world of small devices. Please come in, and let me introduce you to Java ME (Java Micro Edition). I promise you this is cool stuff.

Where to start? Well, why don't we start with a quick history lesson. How did Java ME come about?

Because Java has become so successful and encompasses such a wide range of applications running on so many diverse environments, the platform was divided into three sections in the late 1990s.

Java ME (J2ME) stands for Java MicroEdition, which targets the extremely diverse array of consumer and handheld devices that have suddenly proliferated like wildfire in recent years. This is in contrast to Java EE (Java Enterprise Edition), which refers to the specs that govern the use of java in distributed server side environments, or Java SE (Java Standard Edition), which addresses the needs of the desktop.

The relationship between the three can be thought of as a superset-subset one, with Java ME (J2ME) being a subset of Java SE, while itself being a subset of Java EE.

The Java Family.


Seems simple enough, but here it gets a bit more difficult.

The problem for SUN and its partners was the extremely diverse range of devices that Java ME (J2ME) was supposed to target, with minimal devices having as little as 1 kb of RAM and 24 kb of ROM (and small or no screens), while the larger, more capable devices had nearly the capabilities of desktops! Java ME (J2ME) needed to be extremely flexible in meeting the demands of all these target devices.

On the one hand, they wanted some portability going from one small device to another. On the other hand, the range of these devices in terms of memory, speed, and other capabilities was daunting.

They could have:

  1. Created an all-encompassing architecture that would have contained every single available and possible API, BUT this would mean that lower end devices would be overburdened because of their memory constraints.

  2. Created an architecture for the lowest common-denominator, which would mean stripping most everything out of the Java ME (J2ME).

They decided on neither --- What they finally decided on was to make the Java ME (J2ME) extrememly modular, with particular profiles targeted at specific devices, BUT with most portability maintained across configurations.

The next section may get a bit hairy. If you'd like a summary, suffice it to say that Java ME today is represented by two profiles from the two different configurations (CDC for high end devices, CLDC for lower-end devices). MIDP (in the CLDC configuration) was introduced first and has become extremely successful for lower-end cellphones and even for smartphones and PDAs. All the "killer apps" of Java ME are MIDP apps (Google Maps Mobile, Opera Mini, ESPN Mobile, and so on). The CDC profile has the Personal Profile (PP), which is the main subject of this website, and which is targetted towards more powerful small devices.

If that's a good enough and clear enough explanation for you, you can skip the next section.

Configurations and Profiles

These two are what make the Java ME (J2ME) extremely flexible and modular, but at the same time they cause lots of confusion among beginner programmers.

Configurations are targeted towards a horizontal group of devices, meaning devices that have similar memory constraints, similar user interface requirements, similar network capabilities, etc. It's the minimum platform (VM, core java classes) that will support a relatively broad range of similar devices (e.g. low and medium end PDAs and cellphones could be placed in the same configuration because they may have similar requirements and needs as noted above). There are two current configurations: The CDC (Connected Device Configuration), for capable devices such as Symbian Communicators and high end PDAs; and CLDC (Connected Limited Device Configuration), for low end PDas and such limited devices as cell phones, pagers, and smart cards.

This website is concerned mostly with the CDC configuration.

Profiles sit on top of a configuration and will not work without the underlying configuration. Profiles target devices in a specific vertical market (e.g. MIDP profile, which is part of the CLDC configuration targets low end cellphones, while the Presonal Profile is targeted towards higher-end mopbile devices). Profiles contain the java classes that focus on specific implementations such as user interface components and record managment (ie. where and how to store persistent data).

The image below represents the relationships between the different Java ME (J2ME) configurations and profiles. Click on the respective profiles/configurations for more information. The different profiles are based upon two configuration: the CDC (Connected Device Configuration) for high end devices, and the CLDC (Connected Limited Device Configuration), for resource constrained devices like basic cell phones and pagers.

The Java ME (J2ME) Family.

Why Java ME?

Java ME is the most successful platform for developing mobile device applications. Just looking at the numbers makes one giddy!

For example, it's estimated that there are 3.3 billion Java-enabled devices worldwide, and Java ME makes up the bulk of that, with 1.2 billion mobile handsets running Java and another 1.5 billion smartcards (including SIM cards) that are Java-powered.

Here are the numbers for you:

  • 190+ operators worldwide have deployed Java-enabled handsets (src: Nokia, November 2005)
  • There are 635+ types of Java-enabled handsets from 32+ different manufacturers (src: Ovum June 2005)
  • There are now 4500+ Java mobile applications in the market (src: Informa Telecoms and Media June 2005)

The vast majority of the Java-enabled handsets use MIDP, but a growing number will most probably run the CDC and Personal Profile.

So, here's the challenge to you. Are you a developer who's looking to expand your horizons beyond the confines of the server room? Are you a desktop guy who'd like to move your app into the fast-growing mobile desktop?

If you are, then come on in, and I bid you welcome! Open your eyes and enjoy the coming ride!

Copyright © 2006  A. San Juan. Java ME and other terms are trademarks or copyright of Sun Microsystems and/or other companies. Images of mobile devices are copyright to their respective companies. Legal Stuff.