Contents of This Book

This book is divided into three parts. Part I gives an overview of the J2ME and includes information about its architectural components: namely, configurations and profiles. Part I also presents detailed coverage of the CLDC and the MIDP.

Chapter 1

This chapter introduces the J2ME environment and also explains configurations and profiles. In addition, it shows you how to set up the J2ME Wireless Toolkit to compile, preverify, and run a simple MIDlet using the command line with the Wireless Toolkit emulator.

Chapter 2

This chapter discusses the CLDC, including its requirements, limitations, and the differences between its classes and the classes of the J2SE. In addition, it looks briefly at the standalone CLDC and KVM distribution.

Chapter 3

This chapter introduces the requirements, limitations, and classes of the MIDP, as well as introducing MIDlets and their associated Java Application Descriptor (JAD) files.

Part II contains programming details of the MIDP. It shows you how to program the phone interface, handle events, make network connections, and work with databases.

Chapter 4

This chapter picks up where Chapter 3 left off, explaining the MIDlet lifecycle methods, the Java application manager, and showing how to use the KToolbar application inside the J2ME Wireless Toolkit to simplify MIDlet development. We also discuss how to deploy MIDlets and include step-by-step instructions on how to download a MIDlet into a Motorola i85s or i50x J2ME-enabled phone.

Chapter 5

This chapter introduces the MIDP GUI model and its associated classes. In addition, it gives detailed coverage of both the high-level and low-level MIDP GUI APIs.

Chapter 6

This chapter continues the discussion of the MIDP GUI APIs by describing how various events take place surrounding the graphical components and commands. In addition, we cover the CommandListener and ItemStateListener interfaces, as well as low-level event handling.

Chapter 7

This chapter discusses the Generic Connection Framework provided by the CLDC and shows how to implement an HTTP connection across the Internet, using a MIDlet. The chapter also includes examples of how to send data to CGI scripts and Java servlets across a network. Finally, the chapter briefly discusses wireless session tracking and security for MIDlet data traveling across the airwaves.

Chapter 8

This chapter introduces the concept of data stores, which are simple databases that MIDP applications can use to store persistent data beyond the lifetime of the MIDlet that created them. In addition, the chapter includes a MIDlet that can be used to download stock information from a remote web site.

Chapter 9

This chapter gives a quick introduction to the MIDP implementation on the Palm Connected Organizers, including step-by-step instructions on how to deploy MIDlets to a PalmPilot.

Part III contains several chapters that are quick references for the J2ME CLDC and MIDP APIs. There is also an appendix that contains bibliographic information and URLs to J2ME specifications, white papers, wireless software development kits, and other information that is important to developers.

Conventions Used in This Book

This book uses the following typographical conventions:

A Constant Width font is used for:

  • Anything that might appear in a Java program, including keywords, data types, constants, method names, objects, variables, class names, and interface names

  • All Java code examples

  • Attributes that might appear in a manifest or JAD file

An italic font is used for:

  • New terms where they are defined

  • Pathnames, filenames, directory names, and program names (unless the program name is the name of a Java class; then it appears in constant width, like other class names)

  • Internet addresses, such as domain names, URLs, and email addresses

A boldface font is used for:

  • Example lines of Java code to which we wish to draw attention

Get Wireless Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.