Mobile applications development tutorial in J2ME

New J2ME Project in NetBeans
  • emulators of mobile devices that support Java applications; such an emulator is already integrated in the distribution of NetBeans; the simulated mobile device is a generic one; if you want to test the application in a specific environment (for a specific mobile device) you may use resources made available to by the manufacturer; eg for Nokia devices, a source for SDKs (Standard Development Kit) of different generations and models is forum.nokia.com;

The first thing to do is to create a Java ME mobile application (MIDlet).

  1. open NetBeans environment
  2. choose File -> New Project
  3. in Java ME category select a Mobile Application project type.

Platform Selection for J2ME mobile application4. define the location (and uncheck the Create Hello MIDlet)

5. at the third step – Default Platform Selection, are defined next resources:

  • used emulator; implicitly, if you installed just NetBeans, without any SDKs, is available only Sun Java Wireless Toolkit 2.5.2 for CLDC;
  • type of mobile device (color or monochrome screen, qwerty keyboard);
  • configuration of the device, for this simple project select CLDC-1.0; CLDC or Connected Limited Device Configuration is a standard that describes the hardware features of your mobile device; version 1.0 of the standard describes a device with 128 KB for Java virtual machine, 32 MB dynamic memory, visual interface and limited ability to connect to a data network; this standard is defined by a consortium, which includes major manufacturers of mobile devices, to help software developers to establish the hardware limits of the device; also these settings have an impact on how the project will be compiled;
  • device profile; for this project select MIDP-2.0; MIDP or Mobile Information Device Profile is an extension of the hardware configuration (CLDC) describing the software characteristics of the device with reference to the available frameworks and Java virtual machine;
  • the chosen combination ( CLDC-1.0 MIDP-2.0) is valid for more than 75% of mobile devices released after 2005 (in your mobile device specifications you can find all of these).

Once the MobileApplication type project has been created we must define the context based on which we will build the application. This means inserting a MIDlet type resource using NetBeans menu options (File -> New File …) or through the context menu (New -> MIDlet) activated with right-click on the project name.
By adding a MIDlet resource type, a file with the .java extension, it is generated the MidletHelloWorld class, that is derived from MIDlet abstract class.

Initially, this class has the form:

import javax.microedition.midlet.*; public class MidletHelloWorld extends MIDlet { public void startApp { } public void pauseApp { } public void destroyApp(boolean unconditional) { } }


You might also like

J2ME tutorial: Ticker
J2ME tutorial: Ticker
Android Application Development Tutorial - 107 - Toggling
Android Application Development Tutorial - 107 - Toggling ...

WebView Exploit Can Make Calls From Your Phone  — VPN Creative
Clicking on his link in Messenger immediately initiated a telephone call without warning; according to Neculaesei, this was a sign that Facebook mobile developers likely did not read Apple's URL Scheme documentation.