Home > Store > Programming > Java

Java™ Development on PDAs: Building Applications for Pocket PC and Palm Devices

Register your product to gain access to bonus material or receive a coupon.

Java™ Development on PDAs: Building Applications for Pocket PC and Palm Devices


  • Your Price: $31.99
  • List Price: $39.99
  • Usually ships in 24 hours.


  • Copyright 2003
  • Dimensions: 7x9-1/4
  • Pages: 256
  • Edition: 1st
  • Book
  • ISBN-10: 0-201-71954-1
  • ISBN-13: 978-0-201-71954-3

With the release of Java 2 Micro Edition (J2ME), Sun Microsystems opened Java to the rapidly expanding Personal Digital Assistant (PDA) market.

This comprehensive tutorial and reference provides an in-depth look at developing PDA software with J2ME and PersonalJava, covering both Palm and PocketPC devices. Succinct and practical, Java™ Development on PDAs focuses on real-world programming tasks with extensive code examples and an end-to-end PDA application demonstrating techniques for integrating devices with the enterprise via Web services.

This book describes the J2ME platform and PersonalJava and discusses design issues specific to resource-constrained devices. It also provides in-depth coverage of networking and Internet access, the user interface, data storage, and integrating PDAs into the corporation.

You will learn to develop Java applications for PocketPC and Palm devices through in-depth coverage of:

  • J2ME configurations
  • CLDC and CDC profiles
  • Selecting a PDA for development
  • PDA development tools
  • Designing for constrained computational capability
  • Designing for constrained screen and memory size
  • PDA user interfaces
  • Storing information on the devices
  • The Generic Connection Framework
  • Internet access from a Java PDA application via a GSM phone and Bluetooth
  • Accessing Web services from Palm and PocketPC devices

Java™ Development on PDAs concludes with a look into the future of PDA technology and the expanding role of these devices in the enterprise.

Written for anyone with a basic knowledge of Java, this important resource is a must-have for all those interested in the Palm OS and PocketPC markets.



Source Code

Click for the Source Code related to this title.


Related Article

Java On Pocket PC Devices

Sample Content

Downloadable Sample Chapter

Download the Sample Chapter related to this title.

Table of Contents


1. Java 2, Micro Edition: Configurations, Profiles, and Virtual Machines.

J2ME Configurations.

CLDC Optional Packages.

CDC Profiles.


2. Which PDA?

Why Choose?

Top Factors in Choosing a PDA for Java.

Which Java on Which PDA?

Palm Models.


3. Setting Up the Development Environment.

Installing the Books Source Code.

Setting Up the Palm OS Emulator.

J2ME Wireless Toolkit.

Running Java Applications on the Palm.

Running Java Applications on the PocketPC.


4. Things To Think About When Designing for Small Devices.

Design Issue 1—Constrained Computational Capability.

Design Issue 2—Constrained Screen Size.

Design Issue 3—Constrained Memory Size.


5. The User Interface.

User Interfaces in MIDP.


User Interfaces in PersonalJava.


6. Storing Information.

Storing Information Using MIDP.


Code Example.

Record Listeners.

Palm Implementation of Record Stores.

Other Java Databases.

Storing Information with PersonalJava.


7. Networking.


Networking on Palm Devices.

The Generic Connection Framework.


Internet Access From the Palm Device.

Networking on the PocketPC.


8. Integrating with the Enterprise Using Web Services.

What is a Web Service?

The ImageService Web Service.

Setting Up Axis and Tomcat.

The ImageViewer Client Application.

Web Service Access From A Palm Device.

Palm ImageViewer.

PocketPC Version.


9. Futures.


Specifications. 0201719541T03032003


Java and PDAs are a powerful combination. In 2003, sales should increase to 19.5 million units. While PC sales have arguably peaked, PDAs are still very much in a growth phase.

Java is also a huge market, with millions of developers working world-wide in all areas of computing: from mainframes to matchbox-sized web servers.

What this book is about

This book is about using Java to develop PDA applications. Having spent many years writing applications in C and then in C++, I felt that Java was a giant leap forward when I started using it in November 1995. I wrote this book because I wanted to develop applications for PDAs, but did not want to go back to writing applications in C. After learning Java and realising its power for developing a wide range of applications, I did not want to step back. Perhaps you feel the same way.

Aside from personal preference for development language though, there are good business reasons to use Java to develop PDA applications. Firstly, your organization may be already using Java to develop enterprise systems. A large amount of time, money, and effort has probably been invested in building up Java expertise, tools and resources.

Secondly, you may be attracted by the ability to write portable applications using Java 2, Micro Edition. Just as Java code is portable across platforms supporting the other editions of Java 2 (Enterprise and Standard), applications written for Java 2 Micro Edition are portable across platforms supporting the same configurations and profiles. However, it’s fair to say that applications written for the Standard and Enterprise editions of Java 2 are more easily portable across platforms than applications written for the Micro edition. This is because, unlike the other editions, Micro edition applications target severely constrained devices. Because the platforms targetted by the Micro edition differ from each other in terms of memory and screen real estate much more than their enterprise and desktop counterparts, configurations and profiles dictate the features that are available on each platform. However, Micro edition applications that are written for one platform that supports a configuration and profile combination are quite portable to other platforms supporting the same combination. It’s a nice feeling to know that an application written for J2ME on a PDA is usable on other devices supporting the same configuration and profile, and vice versa. This is vastly different from writing applications in C or C++ for the same devices. We’ll be talking about configurations and profiles in a later chapter.

Thirdly, you may wish to re-use simple business logic in your devices applications that has developed for other applications. You may want to check for a valid credit card number on the PDA application, and you may have a corporation-wide standard class for card number validation.

Any or all of these reasons are good reasons to be interested in Java on PDAs.

Once you want to develop PDA applications using Java, you are faced with some more decisions about which Java to use. There are several options. This book focuses on options that conform to the Java 2 Micro Edition and PersonalJava standards because these are open standards for Java on resource-constrained devices. The standards are open because specifications are created as part of the Java Community Process, which is open to all developers for contributions and review of drafts.


The scope of the book includes developing Java applications for the Palm and PocketPC PDAs using J2ME and PersonalJava respectively. Strictly speaking, PersonalJava is part of the J2SE family rather than J2ME, but it is included in the book’s scope because most PocketPCs already sold and sold today come with PersonalJava installed. Additonally, as I write, implementations of the J2ME replacement for PersonalJava (the Personal Profile, which we will discuss later) have not yet arrived for the PocketPC.

Since the book is focussed on what a developer can do today on a Palm or PocketPC PDA, the J2ME PDA Profile (PDAP) is covered briefly, but the book does not present PDAP code. This is because the PDAP has not yet been finalised in the Java Community Process, and implementations on real devices are not yet available. Hopefully this situation will change soon.

While the applications presented in this book will run on other platforms, such as mobile phones, the specific intent is to focus on applications that run on PDAs and the considerations a PDA developer should keep in mind.

In the book we will consider the end-to-end solution for integrating a PDA into the enterprise, and so the book does includes some server-side code.

Not included in scope is coverage of other PDAs such as the Sharp Zaurus. To make the book manageable, I decided to concentrate on the two dominant products in the PDA market. Also not included is coverage of PocketPCs running operating systems other than WindowsCE, such as iPaqs that run Linux.

The book does not cover Java-like languages for PDAs such as Waba, since they are not based on the open Java standard.


This book is written for developers who already know Java, and who want to write Java applications for PDAs, in particular the PocketPC and Palm devices. It is my intention to present the necessary concepts in practical terms, so that a Java developer can pick it up and start writing PDA applications in Java quite quickly. It assumes that you already have some Java experience with the Standard edition and/ or the Enterprise edition.

This is not a book for people interested in learning Java. If that applies to you, I suggest buying an introductory Java book and downloading Java 2 Standard Edition from www.java.sun.com. Learning Java with J2SE is a much better way to get started.

Code Source

Rather than bulking up this volume with page after page of source code listings, I have made the source code available for download from the book’s companion Web site at www.javaonpdas.com. This allows me to ensure that the most up-to-date source is available at all times and, as a reader, I would prefer that a book’s volume is taken up with truly useful information. I hope you agree that this is a good idea.

Development Environment

The chapters are intended to be independent of the development environment you may choose. In “Setting Up the Development Environment,” we discuss the options for a development environment. Whichever environment you initially choose, or to which you subsequently switch, the source code in other chapters will remain useful.

The development platform used in all the examples is Windows. Generally it is noted where tools run on other platforms, but I have not tried to run the tools on other platforms. I have tried to be platform-neutral as much as possible though, so if you are running a desktop operating system other than Windows the book is hopefully still useful to you.



Download the Index file related to this title.


Submit Errata

More Information

Unlimited one-month access with your purchase
Free Safari Membership