This is first installment in a four-part comprehensive introduction -- two tutorials and two articles -- to Java 2 Micro Edition (J2ME) and the Mobile Information Device Profile (MIDP). In this tutorial you will learn about the essential components of J2ME, with a primary focus on MIDP. We'll focus here on MIDP's high-level user interface, with a step-by-step introduction to the components that facilitate the main interaction between the user and the device display. These components include
among others. You will also learn about event-handling techniques for the high-level API, using both
In the second part of the tutorial you will learn how to work with MIDP's low-level user interface. We'll walk through exercises that include creating and drawing on a canvas, working with fonts, and drawing shapes. As part of this discussion you will become familiar with all the J2ME components that work directly with the device display.
Two companion articles round out this introduction to J2ME. The first article will introduce you to the Record Management System (RMS), which is the persistent storage environment within MIDP. The second article will cover networking support for J2ME. You'll learn about the Generic Connection Framework, opening network connections and communicating with remote systems, talking with Java Servlets, and a few other goodies.
Portions of this tutorial are used with permission from the book Core J2ME Technology and MIDP by John W. Muchow, published by Sun Microsystems Press and Prentice Hall. Copyright 2002 Sun Microsystems Inc.
This tutorial is intended for experienced Java programmers who would like to learn how to develop mobile applications using J2ME. The code examples are not particularly complex, but it is assumed that you understand how classes are created, inherited, and instantiated within the Java platform. You will also benefit from a working knowledge of using and creating Java Archive Files (JARs). See Resources for more information on using JARs.
To complete this tutorial you will need to install JDK version 1.4 or greater, along with the J2ME Wireless Toolkit (WTK). The WTK download contains an IDE for creating Java applications, commonly called MIDlets, as well as the libraries required for creating them.
The WTK is contained within a single executable file. Run this file to begin the installation. It is recommended that you use the default installation directory. If you choose another directory, make sure that the path you select does not include any spaces.