The Good
J2ME is small, actually very small; writing programs for devices with very limited memory capabilities has been made into a reality by J2ME. J2ME allows the programmer to customize his program to the utmost possibility, right from the configuration he wants to work with to the very profile he is using.
Further, the future versions of the KVM will have the capabilities of integrating the present programs with further memory hungry operations.
Tuesday, June 10, 2008
Java 2 Micro Edition - Conclusion
Labels:
Java 2 Micro Edition
Java 2 Micro Edition - Case Study
Extending one’s knowledge of Java to J2ME is very easy. Every program in J2ME is called a midlet and extends from the midlet class. Here is a sample program in NetBeans using the CLDC configuration and the MIDP 2.0 profile.
As evident from the screen-shots, the constructors in both the programs are very much similar. A few differences exist in the both such as the import statements in J2ME where two packages - midlet and lcdui are imported. Further an alert object is constructed to display the message.
Three important functions are present in every J2ME program. They are -
Three important functions are present in every J2ME program. They are -
| startApp | Called whenever the application is started |
| pauseApp | Called whenever the application is paused |
| destroyApp | Called whenever the application is terminated |
Labels:
Java 2 Micro Edition
Java 2 Micro Edition - Profiles
A Profile primarily defines the type of device supported. Profiles are built on top of configurations, since they are specific to the memory available. They add an additional layer on the top of the configuration layer providing APIs for a specific class of devices.
Profiles are specific to the configurations selected. For different configurations, different profiles are available.
Profiles are specific to the configurations selected. For different configurations, different profiles are available.
Labels:
Java 2 Micro Edition
Java 2 Micro Edition - Configurations
Configurations define the basic run-time environment as a set of core classes. They add the classes required for the program to be compatible with the virtual machine.
J2ME has two main configurations – Connected Limited Device Configuration (CLDC) and Connected Device Configuration (CDC). These configurations actually specify the main type of the device, which defines how much memory is available for the operations to be performed.
J2ME has two main configurations – Connected Limited Device Configuration (CLDC) and Connected Device Configuration (CDC). These configurations actually specify the main type of the device, which defines how much memory is available for the operations to be performed.
Labels:
Java 2 Micro Edition
Java 2 Micro Edition - Virtual Machines
A virtual machine is the immediate layer overlying the operating system and is mainly responsible for running any program written in Java. This is the main reason that codes written in Java are highly portable. The virtual machine interprets the Java byte-code and converts into native system calls. Further as every program runs in the confinement of the virtual machine, no penetration is possible into the operation system, reducing the risk of viruses.
J2ME offers two different virtual machines, namely CVM (for higher end mobile devices) and KVM (for lower end mobile devices). CVM is used for devices which have higher memory capabilities and which are closer to computers whereas KVM is used for devices which have lower memory capabilities, such as mobile phones. KVM and CVM are primarily nothing but the subset of JVM. They can be thought as just shrunken versions of the JVM and are more specific to J2ME.
J2ME offers two different virtual machines, namely CVM (for higher end mobile devices) and KVM (for lower end mobile devices). CVM is used for devices which have higher memory capabilities and which are closer to computers whereas KVM is used for devices which have lower memory capabilities, such as mobile phones. KVM and CVM are primarily nothing but the subset of JVM. They can be thought as just shrunken versions of the JVM and are more specific to J2ME.
Labels:
Java 2 Micro Edition
Java 2 Micro Edition - An Overview
Mobile devices have become a part and parcel of almost everybody’s life. By mobile devices, we don’t mean just our cell phones, but also devices such as pagers, personal digital assistants (PDA’s) and small retail terminals (devices such as set-top boxes).
To use these devices more effectively and more efficiently, programming was introduced into these devices. Every mobile device has a basic operating system which co-ordinates the various tasks to be performed by the device itself. Examples of these operating systems are the Symbian operating system, Windows operating system, Linux operating systems and many others. Many of the primitive models had a PROM built in them, instead of an operating system, so as to start the mobile device without any hassles.
Different file formats have been developed for these mobile devices. Many of these are basic extensions of a high level language so as to perform properly even at the availability of less memory. Examples of this are the *.sis and *.sisx file formats which are basic extensions of C, *.jar and *.jad which are basic extensions of the Java 2 Standard Edition.
To use these devices more effectively and more efficiently, programming was introduced into these devices. Every mobile device has a basic operating system which co-ordinates the various tasks to be performed by the device itself. Examples of these operating systems are the Symbian operating system, Windows operating system, Linux operating systems and many others. Many of the primitive models had a PROM built in them, instead of an operating system, so as to start the mobile device without any hassles.
Different file formats have been developed for these mobile devices. Many of these are basic extensions of a high level language so as to perform properly even at the availability of less memory. Examples of this are the *.sis and *.sisx file formats which are basic extensions of C, *.jar and *.jad which are basic extensions of the Java 2 Standard Edition.
Labels:
Java 2 Micro Edition
Subscribe to:
Posts (Atom)



