Books Related to Java, Core Java, Jquery, Web Services, SCJP, Spring, Hibernate and J2ME

Monday, April 27, 2009

Introduction to J2ME

J2ME (Java 2 Platform, Micro Edition) was designed by Sun Microsystems, it is a java technology that allows java programmers to use the Java programming language and j2me tools to develop programs for mobile phones, pagers, wireless devices and personal digital assistants (PDA). The j2me have limited processing power, limited storage capabilities and low-bandwidth network connections. J2ME consists of programming specifications and a special virtual machine, the K Virtual Machine, that allows a J2ME-encoded program to run in the mobile device.

J2ME programming specifications:

  • Connected, Limited Device Configuration (CLDC)
  • Mobile Information Device Profile (MIDP).


  • it defines the Java environment for mobile phone, pager and wireless devices
  • CLDC devices are normally wireless
  • Memory available for Java 160 - 512k
  • typically it has limited power or battery operated
  • network connectivity, often wireless, intermittent, low-bandwidth (9600bps or less)


  • this is the application environment for wireless devices based on the CLDC
  • it holds classes for user interface, storage and networking


A MIDlet is a J2ME application which handle on an MIDP. MIDlets are J2ME optimized servlet API and architecture-based applications for Java enabled devices such as wireless device, PDA, cell phones and the RIM BlackBerry. A MIDlet is specified with at least a single class that is derived from the javax.microedition.midlet.MIDlet abstract class.

A MIDlet is an event-based application. All functions executed in the MIDlet are raised in response to an event reported to the MIDlet by the application manager. The initial event that happens is when the MIDlet is started and the application manager invokes the startApp() method. The startApp() method in a typical MIDlet holds a statement that displays a screen of data and prompts the user to enter a selection from among one or more options. A Command object is used to present a user with a selection of options to choose from when a screen is displayed. Each screen must have a CommandListener. A CommandListener monitors user events with a screen and causes the appropriate code to execute based on the current event.

JAR Files:

  • Nine attributes are defined in this file. The first six attributes are necessary.
  • The file’s extension is changed to .mf when the MIDlet is prepared for deployment.
  • All entries are name: value pairs.
  • Each pair must be terminated with a carriage return.
  • White space between the colon and the attribute value is ignored.

Manifest File: Necessary Attribute

  • MIDlet-Name: MIDlet suite name.
  • MIDlet-Version: MIDlet version number.
  • MIDlet-Vendor: Name of the vendor who supplied the MIDlet.
  • MIDlet-n: Attribute per MIDlet. Values are MIDlet name, optional icon, and MIDlet class name.
  • MicroEdition-Profile: Identifies the J2ME profile that is necessary to run the MIDlet.
  • MicroEdition-Configuration: Identifies the J2ME configuration that is necessary to run the MIDlet.

Optional Attribute

  • MIDlet-Icon: Icon associated with MIDlet, must be in PNG image format.
  • MIDlet-Description: Description of MIDlet.
  • MIDlet-Info-URL: URL containing more information about the MIDlet.

JAD File

JAD Files is used to pass the parameters to a MIDlet without modifying the JAR file. It must have the .jad extension. It also used to provide the application manager with additional content information about the JAR file to determine whether the MIDlet suite can be implemented on the device. There are five necessary attributes for a JAD file:

  • MIDlet-Name: MIDlet suite name.
  • MIDlet-Version: MIDlet version number.
  • MIDlet-Vendor: Name of the vendor who supplied the MIDlet.
  • MIDlet-n: Location of the JAR file.
  • MIDlet-Jar-URL: Attribute per MIDlet. Values are MIDlet name, optional icon, and MIDlet class name.

Optional Attribute:

  • MIDlet-Jar-Size: Size of the JAR file in bytes.
  • MIDlet-Data-Size: Minimum size (in bytes) for persistent data storage.
  • MIDlet-Description: Description of MIDlet.
  • MIDlet-Delete-Confirm: Confirmation required before removing the MIDlet suite.
  • MIDlet-Install-Notify: Send installation status to given URL.

Tuesday, January 20, 2009

J2ME Interview Question

  1. What is WDP
  2. What is WMA
  3. What is WML
  4. What is WMLScript
  5. What is WSP
  6. What is WTLS
  7. What is WTP

J2ME Interview Question

  1. What is Provisioning
  2. What is PSTN
  3. What is RMI
  4. What is RMI OP
  5. What is RMI Profile
  6. What is RMS
  7. What is SIM
  8. What is T9
  9. What is TDMA
  10. What is W-CDMA

J2ME Interview Question

  1. What is PDAP
  2. What is PDC
  3. What is PDCP
  4. What is Personal Profile
  5. What is PersonalJava
  6. What is PNG
  7. What is POSE
  8. What is PRC
  9. What is preverification
  10. What is profile

J2ME Interview Question

  1. What is MIDlet suite
  2. What is MIDP
  3. What is MIDP-NG
  4. What is Mobitex
  5. What is Modulation
  6. What is MSC
  7. What is Obfuscation
  8. What is optional package
  9. What is OTA
  10. What is PCS