Before start programming using J2ME technology I think it's better explaining what is J2ME and why it is so popular. Actually what is java J2ME? Is it only for java enabled mobile phones?... The answer is NO.
" Java ME is designed to provide portability of applications between platforms " this is what java officail website says about J2ME.
In late 1998 Sun Microsystems (now a subsidiary of Oracle Corporation) focused on developing Mobile devices and entertainment devices. This was originally named as The Oak Project. As a result Sun released PersonalJava also abbreviated to pJava to be used on mobile and other resource constrained devices. This is the birth of J2ME. (However the pJava has discontinued now).
See the above picture. It shows java technology stack.We all know that java is running on a virtual machine. In J2ME it also running on a virtual machine except for mobile phones and for some PDA's (Personal Digital Assistant) Since the limitations of these devices they use a virtual machine called KVM to run java applications.
Java 2 Micro Edition mainly divided into three different sections.
Configuration is a set of hardware functionality available to a mobile device. Processor type and speed, amount of memory available, network connections available to the device etc. These configurations are totally dependent on their manufactures. Currently there are two types of configurations available for J2ME.
- Connected Limited Device Configuration ( CLDC )
* 128KB of memory for run java programs
* 32KB of memory for run time allocation
* Limited user interface etc.
There are two versions of CLDC which is CLDC 1.0 and CLDC 1.1 . Before programming mobile applications you must have a clear idea of these two versions. Some unique characteristics of CLDC 1.0 and 1.1 are listed below
- Floating point support added in CLDC 1.1, ( not present in 1.0 )
- The minimum memory budget has been raised from 160KB to 192KB to support the Floating point capabilities
- Methods like equalsIgnoreCase(), insert() append() (in StringBuffer class) , Thread.interrupt() Thread.getName() are present in CLDC 1.1
- The final thing you have to remember is that CLDC 1.0 is fully backward compatible with CLDC 1.1 which says that CLDC 1.0 Midlets will run on CLDC 1.1 devices.
- Connected Device Configuration( CDC )
* 32 Bit CPU or above
* 2 MB RAM or above
* 2.5 MB ROM or above
CDC configurations can be seen in Smart Phones, Navigation Systems etc.
Profile is a API (Application Programming Interface ) for a specific domain. Profiles are built on top of configurations. Certain Profiles are defined according to their configurations MIDP or the Mobile Information Device Profile is the most talked about when comes to java mobile programming.
There are several Optional Packages available such as Wireless Messaging API (WMAPI), Mobile Media API (MMAPI), J2ME Web Services API, Bluetooth API etc. We will talk more about these in later posts.
Now I think you have some idea about J2ME and what is it meant for. In later chapters we are going to talk about Midlets and their functionality. Afterwards we gonna have a hell lot of coding. Don't get upset I'm just beating around the bush, you to be familiar with the jargons that are coming in near future.