February 28, 2021
Hot Topics:

The Basics of J2ME

  • By Prentice Hall
  • Send Email »
  • More Articles »


To support the broad range of products that fit within the scope of J2ME, Sun introduced the Configuration.

A Configuration defines a Java platform for a broad range of devices. A Configuration is closely tied to a Java Virtual Machine (JVM). In fact, a Configuration defines the Java language features and the core Java libraries of the JVM for that particular Configuration.

The dividing line as to what a Configuration applies is for the most part based on the memory, display, network connectivity (or limitations of) and processing power available on a device.

The Sun J2ME FAQ states the following: "The J2ME technology has two design centersthings that you hold in your hand and things you plug into a wall." This may be a good general definition, but that's exactly what it is, general. Don't let this be your sole guide in deciding which Configuration applies.

Following are typical characteristics of devices within the two currently defined Configurations:

Connected Device Configuration (CDC)

  • 512 kilobytes (minimum) memory for running Java
  • 256 kilobytes (minimum) for runtime memory allocation
  • Network connectivity, possibly persistent and high bandwidth

Connected, Limited Device Configuration (CLDC)

  • 128 kilobytes memory for running Java
  • 32 kilobytes memory for runtime memory allocation
  • Restricted user interface
  • Low power, typically battery powered
  • Network connectivity, typically wireless, with low bandwidth and intermittent access

Although this division seems pretty clear, this won't always be the case. Technology is continually advancing. Remember your first computer? What was "state-of-the-art" in 1985 (when I purchased my first personal computer) pales in comparison to what is available today.

The point is, as technology offers us more processing power, with increased memory and screen capabilities, the overlap between these categories will become larger. This is a nice segue to our next discussion, Profiles.


It's all well and good that devices will fall within one Configuration or the other. For example, a typical cellular phone, PDA and pager will all fit the guidelines of the CLDC. However, what seems limiting to one device in a Configuration may be an abundance to another. Recall the analogy of the cellular phone screen size versus that of a PDA.

To address this broad range of capabilities, and to provide for more flexibility as technology changes, Sun introduced the concept of a Profile to the J2ME platform.

A Profile is an extension, if you will, to a Configuration. It provides the libraries for a developer to write applications for a particular type of device. For example, the Mobile Information Device Profile (MIDP) defines APIs for user interface components, input and event handling, persistent storage, networking and timers, taking into consideration the screen and memory limitations of mobile devices.

Beginning in Chapter 3, the remainder of this book will focus on MIDP specifically. This will include everything from the hardware and software requirements to complete coverage of all the APIs.

How are Configurations and Profiles Developed?
Excerpt from J2ME FAQ (http://java.sun.com/j2me/faq.html): Configurations and Profiles are defined by open industry working groups utilizing Sun's Java Community Process Program. In this way industries can decide for themselves what elements are necessary to provide a complete solution targeted at their industry. For more information on the Sun Community Process Program, see: http://jcp.org.

Page 2 of 3

This article was originally published on August 6, 2002

Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Thanks for your registration, follow us on our social networks to keep up-to-date