Types of configurations in J2ME

By: Ivan Lim Emailed: 1769 times Printed: 2516 times    

Latest comments
By: rohit kumar - how this program is work
By: Kirti - Hi..thx for the hadoop in
By: Spijker - I have altered the code a
By: ali mohammed - why we use the java in ne
By: ali mohammed - why we use the java in ne
By: mizhelle - when I exported the data
By: raul - no output as well, i'm ge
By: Rajesh - thanx very much...
By: Suindu De - Suppose we are executing

A configuration is a specification that defines the software environment for a range of devices defined by a set of characteristics that the specification relies on, usually such things as:

• The types and amount of memory available
• The processor type and speed
• The type of network connection available to the device

A configuration is supposed to represent the minimum platform for its target device and is not permitted to define optional features. Vendors are required to implement the specification fully so that developers can rely on a consistent programming environment and, therefore, create applications that are as device-independent as possible.

J2ME currently defines two configurations:

Connected Limited Device Configuration (CLDC)

CLDC is aimed at the low end of the consumer electronics range. A typical CLDC platform is a cell phone or PDA with around 512 KB of available memory. For this reason, CLDC is closely associated with wireless Java, which is concerned with allowing cell phone users to purchase and download small Java applications known as MIDlets to their handsets. A large and growing number of cell phone vendors have signed agreements with Sun Microsystems that will allow them to begin using this technology, so the number of handsets with the capability to be programmed in Java
will probably grow rapidly in the next few years.

Connected Device Configuration (CDC)

CDC addresses the needs of devices that lie between those addressed by CLDC and the full desktop systems running J2SE. These devices have more memory (typically 2 MB or more) and more capable processors, and they can, therefore, support a much more complete Java software environment. CDC might be found on high-end PDAs and in smart phones, web telephones, residential gateways, and set-top boxes. Each configuration consists of a Java virtual machine and a core collection of Java classes that provide the programming environment for application software. Processor and memory limitations, particularly in low-end devices, can make it impossible for a J2ME virtual machine to support all of the Java language features or instruction byte codes and software optimizations provided by a J2SE VM. Therefore, J2ME VMs are usually defined in terms of those parts of the Java Virtual Machine Specification and the Java Language Specification that they are not obliged to implement. As an example of this, devices targeted by CLDC often do not have floating point hardware, and a CLDC VM is therefore not required to support the Java language types float and double or any of the classes and methods that require these types or involve floating-point operations.

It is important to note that configuration specifications do not require implementations to use any specific virtual machine. Vendors are free to create their own VM or license a third-party VM, provided that it meets the minimum requirements of the specification. Sun provides reference implementations of both configurations, each of which includes a conforming virtual machine:

  • The CLDC reference implementation is a source code and binary product for the Windows, Solaris and Linux platforms. It includes the Kilobyte Virtual Machine (KVM), a reduced-functionality VM that has a very small memory footprint and incorporates a garbage collector that is optimized for a memory-constrained environment. KVM, which is discussed in Chapter 2, is likely to be used as the basis for most CLDC implementations in the near future, but there are other VMs that could be used instead, such as the J9 VM from IBM.
  • The CDC reference implementation is a source code-only product for Linux and the Wind River VxWorks real-time operating system. The VM included with this product, called CVM (see Chapter 7), implements the full range of J2SE VM features as required by the CDC specification. However, it does not include the HotSpot technology found in the J2SE Version 1.3 VM or even a just-in-time compiler (JIT) as found in earlier J2SE releases. Several third-party vendors, including Insignia Solutions and IBM, have plans to release their own CDC implementations that include different virtual machines.

A configuration also includes a core set of Java language classes. The core class libraries defined for a configuration (and for profiles) are required to be based on those of the Java 2 platform. This promotes as much compatability as possible between applications written for different J2ME platforms and those written with J2SE, and it also reduces the learning curve for J2ME developers. Broadly speaking, this means that developers can rely on the following: 

  • Where possible, J2ME must reuse J2SE classes and packages. This means that, for example, it would not be acceptable for a J2ME configuration or profile to eschew the java.util.Date class and introduce one of its own.1 As a result, everything that you know about J2SE can be carried forward to J2ME, provided you know the exceptions that apply to the configuration and profiles you are working with. That information is available in the reference section of this book.
  • When a J2SE class is incorporated into J2ME, new methods and fields may not be added to it. Similarly, new classes cannot be added to a coopted J2SE package. These rules ensure that code written for J2ME that uses only those classes it shares with J2SE will compile and work on J2SE, thus making it possible to share code between these platforms.

J2ME Home | All J2ME Tutorials | Latest J2ME Tutorials

Sponsored Links

If this tutorial doesn't answer your question, or you have a specific question, just ask an expert here. Post your question to get a direct answer.

Bookmark and Share


1. View Comment

This article is very good. It is very easy to understand the content of this article.

View Tutorial          By: Vandana B.Dass at 2010-02-01 00:54:54
2. View Comment


View Tutorial          By: vishal at 2013-02-11 03:50:04
3. View Comment

pl send me how to download java 2 micro edition download

View Tutorial          By: Narayana at 2013-02-21 10:08:27

Your name (required):

Your email(required, will not be shown to the public):

Your sites URL (optional):

Your comments:

More Tutorials by Ivan Lim
Requesting a Signed Certificate from a Certification Authority example using keytool in Java
The if-then Statement in Java
SELECT Statements
The BodyTag Interface in JSP
Handling Duplicate Form Submissions in Struts
Standard Input and Output in C
A sample that shows Java Beans, Servlets and JSP working together
Recursion in C
Using Multibox in Struts
switch in C
Word Counting sample program in C
Java Bean Scopes in JSF
Using cout.width() in C++
Types of configurations in J2ME
How to get the CLDC and MIDP version from a J2ME program

More Tutorials in J2ME
Code sample to Send SMS from a J2ME application.
Adding your own Application icon for your J2ME application (jar file)
Play a multimedia file in J2ME Program (Audio/Video) using MMAPI
Datagrams in J2ME (UDP Programming sample)
Client Server in J2ME (Socket Programming sample)
Using HttpConnection in J2ME (Retrieve web content from a website to a phone)
Using HTTP vs UDP vs Socket in J2ME
RMSCookieConnector - Using Cookies in J2ME
POST UTF-8 encoded data to the server in J2ME
lists, forms, choices, gauges, text fields, text boxes in J2ME
Using List to create a Menu and Menu items in J2ME
Using alerts and tickers in J2ME
J2ME Canvas sample to show games programming in J2ME
Timer and TimerTask example in J2ME
List of GPRS Access points for all countries

More Latest News
Most Viewed Articles (in J2ME )
What is J2ME?
Gauge sample program in J2ME
The MIDP Networking Model in J2ME
Internationalization Support in J2ME MIDP
Types of configurations in J2ME
Types of Profiles in J2ME
What is J2ME?
Download a file over a network in J2ME midlet
How to load J2ME applications to the IDEN handsets
Y.S. Sun Green Building Research Center
'LINK.EXE' is not recognized as an internal or ext
Sample Java program shows how to Read a file over a network using J2ME midlet
Sample J2ME code that shows various functionality of RMS.
A sample J2ME midlet that shows an example of using a Timer and a TimerTask.
GUI components and menu based J2ME Applications.
Most Emailed Articles (in J2ME)
A sample J2ME midlet that shows an example of using a Timer and a TimerTask.
A sample J2ME Auto-resume program.
Timer and TimerTask example in J2ME
How to load J2ME applications to the IDEN handsets
paint() sample program to draw a line in J2ME
Sample program to draw text in J2ME
'double buffering' Sample program in J2ME
RMS Basics in J2ME
UDP Datagram sample in J2ME
Types of configurations in J2ME
Types of Profiles in J2ME
What is J2ME?
Download a file over a network in J2ME midlet
Y.S. Sun Green Building Research Center
'LINK.EXE' is not recognized as an internal or ext