Showing posts with label micro. Show all posts
Showing posts with label micro. Show all posts

Tuesday, June 13, 2017

Java 2 Micro Edition Conclusion

Java 2 Micro Edition Conclusion


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.

The Bad

The very strength of J2ME is its biggest weakness. In order to make the KVM small, a lot of compromises had to be made in the Java language itself. Writing complex programs for J2ME requires higher skill and technique than writing one for computers and servers.

Further because of the configurations and profiles, the basic fundamental principle of portability had to be compromised. That is, a program written for a particular profile is portable with other devices following the same profile.

Future Of J2ME

J2ME is still in its blooming stages, and definitely the platform will be evolving. Many more configurations and profiles will be introduced. Further several technologies, such as Jini (network architecture for distributed systems), will arise with the help of J2ME, improving the capabilities of the mobile devices. Needless to say there will be many more devices following the J2ME technology in future.


Available link for download

Read more »

Friday, April 28, 2017

Java 2 Micro Edition Virtual Machines

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.


Available link for download

Read more »

Sunday, April 9, 2017

Java 2 Micro Edition Configurations

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.

CLDC requires less memory whereas CDC requires at least 2MB of memory to perform its computations. The CLDC configuration consists of classes and a set of libraries more specific to the mobile devices. The CDC configuration is basically a stripped down version of J2SE with the CLDC classes added to this.

The CLDC configuration is supported by KVM and the CDC configuration is supported by CVM. Configurations decide whether optional features such as multi dimensional arrays, threads, JNI and others have to be included or not.

CLDC configuration is used when the memory available is low, such as the case of PDAs and cell phones. CDC configuration is used when the memory available is more than 2MB but less than that available on our computers, such as the case of set-top boxes.


Available link for download

Read more »

Friday, February 10, 2017

Java 2 Micro Edition Profiles

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.

CDC Configuration

For CDC configuration, a foundation profile is available, which is primarily a skeleton profile over which we can create our own profile.

CLDC Configuration - MIDP, KJava And Doja

For the CLDC configuration, predefined profiles such as MIDP, KJava and Doja are available. The KJava profile is one of the popular profiles for the Palm OS. It consists of Sun specific APIs. Further its not a standard J2ME profile.

The Doja profile is another popular profile, though not widely used in our mobiles; it is a rapidly growing profile, because of its simple user interface and as it easy to understand. This profile is popularly used in Japan for their local cellular phone companies. However its influence on the entire mobile network is still a long way ahead.

The most popular profile used these days in the Mobile Information Device Profile (MIDP). It is mainly based on the CLDC configuration and is widely used in cellular phones and pagers. Currently there are two versions of MIDP that are available for programming - MIDP 1.0 and MIDP 2.0. Mainly the differences between these two profiles are the fact that the MIDP 2.0 has extended features when compared to MIDP 1.0 such as audio and 2D gaming. On the other hand MIDP 1.0 has greater portability when compared to MIDP 2.0. Many of the cellular phone brands such as Nokia, LG, Samsung, and Motorola use these profiles.


Available link for download

Read more »

Java 2 Micro Edition Case Study

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 -

startAppCalled whenever the application is started
pauseAppCalled whenever the application is paused
destroyAppCalled whenever the application is terminated



Available link for download

Read more »