Java Plateform Micro Edition
Java ME was designed by Sun Microsystems and is a replacement for a similar technology, Personal Java. Originally developed under the Java Community Process as JSR 68, the different flavors of Java ME have evolved in separate JSRs. Sun provides a reference implementation of the specification, but has tended not to provide free binary implementations of its Java ME runtime environment for mobile devices, rather relying on third parties to provide their own. As of 22 December 2006, the Java ME source code is licensed under the GNU General Public License, and is released under the project name phone.
Java ME has become a popular option for creating games for cell phones, as they can be emulated on a PC during the development stage and easily uploaded to the phone. This contrasts with the difficulty of developing, testing, and loading games for other special gaming platforms such as those made by Nintendo, Sony, Microsoft, and others, as expensive system-specific hardware and kits are required.
Usage of Java ME
Java ME includes flexible user interfaces, robust security, built-in network protocols, and support for networked and offline applications that can be downloaded dynamically. Applications based on Java ME are portable across many devices; yet leverage each device’s native capabilities.
Java ME device as implement a profile, the most common of these are the Mobile Information Device Profile aimed at mobile devices, such as cell phones, and the Personal Profile aimed at consumer products and embedded devices like Set-top boxes and PDAs.
Developing with Java ME
Writing a Java ME application uses the same basics programming constructs as used with Java SE applications. Basically there are two types of configurations involved in Java ME application development, which are:
CLDC (Connected Limited Device Configuration)
CDC (Connected Device Configuration)
The Java ME Architecture comprises of three software layers:
first layer is the configuration layer that includes the JVM, which
directly interacts with the native OS. The Configuration layer also
handles the interaction between the profile and the JVM.
The third layer is the Mobile Information Device profile (MIDP) layer. The MIDP layer contains java APIs for user network connections, persistence storage, and the user interface. It also has access to CLDC libraries and MIDP libraries.
The Java ME Application Development
I. System Requirements - Hardware
Minimum hardware requirements are:
II. Minimal Software Requirement
Download the Sun Java Wireless Toolkit for CLDC from
http://java.sun.com/products/ s j w t o o l k i t / d o w n l o a d. h t m
l Ensure that you have installed an appropriate
Java SE environment
Run the installer, sun_java_wireless_toolkit- 2_5_1-linux.exe. Follow the
instructions provided by the installer.
Now we are ready to create an application with Java Platform ME. Lets create a new project with the following steps:
Step 1: Go to Windows start panel and choose" Wireless Toolkit 2.5.1” as: Start > Programs > Sun Java Wireless Toolkit 2.5.1 for CLDC > Wireless Toolkit 2.5.1. The console window appears like this.
Step 2: Now, Click the “New Project” on the toolkit menu bar, then a new project box opens. Fill the appropriate Project name and MIDlet class Name of your choice. After that, click Create Project button.
Step 3: Now, Click the “New Project” on the toolkit menu bar, then a new project box opens. Fill the appropriate Project name (Roseindia)and MIDlet class Name(RoseindiaMID) of your choice. After that, click Create Project button.
Step 4: Then a “Settings for project” window appears. For default settings, click OK. It is
Step 5: Next appears a window indicating the updated project settings saved in the Console.
Here is the code of this program:
Step 6: Now we need to develop a simplest "Hello World" program in the directory structure in src folder.
Step 7: Now, Click the “Open Project” on the toolkit menu bar,
Step 8: Next click the “Build” button from the toolkit menu bar. This causes the Sun Java Wireless Toolkit for CLDC to compile and preverify the Java source files. The whole build process is shown below.
Step 9: Next click the “Run” button from the toolkit menu bar. This executes the compiled Java class files on the emulator.
Step 10: Output of project Roseindia at emulator is lick this
Step 11: Execution of the compiled Java class files on the emulator gives the following customized output. This output window have
Output: Hello World" program