Java tech pour Palm

brazilianchubbyDéveloppement de logiciels

8 juin 2012 (il y a 6 années et 11 mois)

854 vue(s)

Java technologies pour Palm Java tech pour Palm
LG - Lycée G. Eiffel Page 1 sur 19 29/02/2008

Java technologies pour Palm

• Programming in Java

• Developer Tools

• Tutorials

• Sample Programs

• Distributing Your Software

• Packaging & Provisioning

• Testing & Debugging

• Java Technology Details

• Architecture

• Documentation

• Specifications

• Developer Resources

• Third-Party Software

• Books

• Third-Party Components


Developing Java Solutions for Palm Powered™ Devices
PalmSource is the recognized leader in mobile operating system technology. By licensing a Java 2 Micro
Environment runtime, IBM's WebSphere Micro Environment, we have expanded the availability of our
devices to a whole new group of developers: the large and growing community of Java technology
Java developers can now make their existing MIDlets (Java applications) available for the Palm OS®
community of users. No customization is required, simply “packaging
”. However, a developer could also
choose to optimize a MIDlet to take advantage of the flexibility of wide variety of Palm Powered devices –
with their power; memory; range of input options; sharp, colorful and extended displays; and wide area,
local area and personal area network connectivity.
PalmSource continues to encourage and support developers to create innovative applications, streamline
the development process, and get solutions to market quickly and cost-effectively. With Java,
programmers can more easily extend applications and business infrastructure to Palm Powered devices
since they can utilize skills and platforms they have already made investments. In turn, businesses, and
the integrators and solutions providers which serve them, realize an increase in productivity of mobile
employees who take advantage of applications on their Palm OS devices to improve business processes,
and in the reduced time and resources expense required for a successful implementation and
Why J2ME and Websphere Micro Environment?
Java technologies pour Palm Java tech pour Palm
LG - Lycée G. Eiffel Page 2 sur 19 29/02/2008

Java 2 Platform Micro Edition is the version of Java specifically designed for consumer and embedded
devices such as PDAs and mobile phones. J2ME uses the same language and tools as the desktop (J2SE)
and server (J2ME) versions of Java, but with a reduced set of Application Programming Interfaces (APIs).
With Java support on Palm devices, Java architectures and even code can be shared and extended across
all tiers of an end-to-end solution.
The J2ME platform defines the configurations, profiles, and packages that embody a runtime
environment. This combination is designed to optimize the memory, processing power, and I/O
capabilities of specific devices. It is also designed to provide developers to with the core Java APIs for
user interface, persistent storage, networking, multimedia, and security. With some incremental learning,
a single java developer can quickly master coding conventions from smart cards all the way to high
powered devices like settop boxes and high end PDAs.
PalmSource chose IBM’s WebSphere Micro Environment J2ME runtime because it is designed to deliver
the most powerful and flexible J2ME runtime environment available today and is designed to be compliant
with the latest standards defined by the Java Community Process
(JCP), the open process by which Java
standards are developed. The IBM runtime enables support for the industry standard Connected Limited
Device Configuration
(CLDC) and Mobile Information Device Profile
(MIDP), which form the core of J2ME.
The environment is tested against and complies with the Sun Technology Compatibility Kits (TCK), the
standard test suite used to certify a Java environment.
All this means is that if you write a J2ME application that works on one Palm OS device, it should work on
them all, as long as the target device meets your application's hardware requirements.

Programming in Java
To help you get under way developing software for Palm OS® devices using Java technology, PalmSource
provides information on developer tools, as well as tutorials and sample programs.
Developer Tools

Get links to tools and utilities, as well as complete development environments, that will help you build
your Java technology applications for Palm OS devices.

We provide lessons and articles on how to take full advantage of Java technology on Palm OS. This is a
great place to go to get started once you've got developer tools installed.
Sample Programs

If you like to learn by example (which we all do), we provide sample MIDlets. Some are simple samples
of how to do specific tasks, while others are full, useful applications. Take your pick.

Developer Tools
The first thing you need before you can develop Java applications for Palm Powered™ devices is a
development setup that is capable of producing J2ME-compliant MIDlet Suite applications in the JAD and
Java technologies pour Palm Java tech pour Palm
LG - Lycée G. Eiffel Page 3 sur 19 29/02/2008

JAR file formats. There are tools available from free command-line tools to full-featured enterprise-grade
Integrated Development Environments.
The WME Developer Toolkit for Palm OS
(PDT) lets you transform a J2ME MIDlet Suite's JAD and JAR files
into PRC format, ready for execution on a Palm Powered device by WME. The PDT also supports code size
optimization through the removal of unused classes and methods, code obfuscation, as well as
conversion and compression of graphical resources. This toolkit can be used on its own or incorporated
into build environments, through use of scripting tools such as Ant
WebSphere Studio Device Developer

For developers who aren't satisfied with their existing IDE solution or who are already IBM-based,
WebSphere Studio Device Developer (WSDD) provides an excellent solution for J2ME application
development. It can be used as a standalone environment with no dependencies on any other IBM
software or backend servers. It is also based on the Eclipse
open-standards tools effort, backed by
industry leaders such as Borland, Rational, and RedHat. WSDD 5.5 is available today in evaluation and
commercial versions for Windows and Linux.
Borland JBuilder Mobile Edition

Borland JBuilder Mobile Edition includes visual design tools for creating mobile applications, device
emulation, and debugging. Easily build and debug J2ME applications using the MIDP and CLDC platforms.
JBuilder MobileSet includes the J2ME Wireless Toolkit, plus support for special SDKs for several J2ME
devices. It also includes support for over-the-air (OTA) provisioning and more.
Sun ONE Studio

Sun ONE Studio 4 update 1 is the latest release in the Sun ONE Studio line of IDEs for Java technology
developers. Based on the NetBeans Tools Platform, Sun ONE Studio software continues to drive the
market forward by providing the latest support for Java and Industry Standards in the development of
enterprise-class applications and Web services.
Simplicity for Palm OS

Introducing the first cross-platform Rapid Application Development tool created just for the Palm OS
platform using Java technology. Whether you develop on Linux, Windows, Mac, Solaris, or a host of other
platforms, creating applications with Java technology for the Palm OS platform just got easier. Data
Representations uses the same Visual Composer, Execution-On-The-Fly™, and Code Sourcerer™
technologies found in Simplicity for Java and Simplicity Professional. The latest release includes a
developer's version of IBM's J9 Virtual Machine, offering you increased speed and reliability. Simplicity
now offers full-color support for devices that can display in color. With Simplicity for Palm OS Platform,
you can create complete applications for the Palm OS platform within hours!
Sun J2ME Wireless Toolkit

The J2ME Wireless Toolkit is a set of utilities and tools for creating J2ME applications from the command
line. A simple toolbar interface is available to help drive these command line tools, but this is not a full
featured IDE. However, it's an invaluable tool regardless of which development environment you prefer,
as it provides emulation for various phone devices, and includes lots of very good sample code.
Java technologies pour Palm Java tech pour Palm
LG - Lycée G. Eiffel Page 4 sur 19 29/02/2008

Debugging Using the WebSphere Micro Environment Toolkit for Palm OS®
palmOne has created a walkthrough tutorial on how to debug a Java application running on either the
Palm OS Simulator or an actual device, using a network connection.
Download the Toolkit Debug Walkthrough

Sample Programs
To help you get started developing great applications that take advantage of Java technology, take a look
at some of these sample programs.

An example of using a Canvas for drawing in a MIDlet.

A sample program that lets you maintain a database of passwords safely in your PDA or smartphone.

A sample that demonstrates wireless communication by maintaining and keeping up-to-date information
on a stock portfolio thatcan be configured by the user.

Distributing Your Software
Packaging & Provisioning

Get details on how to prepare your Java MIDlet for distribution, and how the user can get it onto their
Palm OS® device.
Testing & Debugging

Get information on how to test and debug your Java MIDlet, both on the Palm OS Simulator and on real
Palm OS devices.

Provisioning Methods
Standard, native Palm OS® applications are distributed in Palm Resource (PRC) format. The application is
then installed using a HotSync® operation, which copies the PRC file to the Palm OS device, by beaming
them from one device to another, or by downloading them directly to the device using a web browser or
email program.
Java technologies pour Palm Java tech pour Palm
LG - Lycée G. Eiffel Page 5 sur 19 29/02/2008

Java 2 Micro Edition (J2ME) was designed with mobile phones or handsets in mind. These typically don't
have a desktop synchronization feature that can be used to install applications. However, these devices
have built-in wireless data capabilities, so a model was developed that relied upon "Over-The-Air" (OTA)
provisioning as the primary means for installing and managing applications.
OTA defines a standard model for how phones should implement support for reliable and trusted
downloading of new applications to a handset. OTA also defines the format in which servers should
provide applications and application metadata to the Java environment on the phone. In addition, OTA
defines an on-device sandbox security model that relies upon cryptographic signing of applications and
granting explicit permissions to perform various functions deemed to be sensitive.
The end result is a system that is designed to allow content distribution while protecting the security and
reliability of both the network, the user's device, and the phone itself.
The PalmSource Java runtime, WebSphere Micro Environment, is designed to support both the traditional
Palm OS method of application provisioning, as well as the Java OTA model. Java applications can be
converted into PRC files, and given all the rights and capabilities of a first-class “native” Palm OS
application. Any MIDlets provisioned to the device via a HotSync operation must be converted to a PRC
before provisioning. Java applications can also be maintained in their original Java Archive (JAR) format,
and provisioning using the OTA model through a wireless connection and web browser, in the exact same
manner as you would on a mobile phone.
Differences Between HotSync and OTA Provisioning
While these two provisioning methods seem similar, there are some crucial differences.
First, the OTA model that supports the JAR format provides a fairly robust security model, enabling trust
in both provisioning and execution of applications. Signing a JAR file enables the Java Application
Manager on the Palm OS device to verify the content of the downloaded application to ensure that it
wasn't modified, and that a trusted authority has verified the identity of the author or developer of the
application. This process is similar to that used to provide secure transactions with web servers when
using a browser on a desktop computer.
Once the application is on the device, it must be granted permission to perform operations like accessing
the network, opening a local serial port, or even reading and writing databases. Palm OS applications are
designed to be able to perform these operations without explicit permission, since having been installed
locally by a HotSync operation, there is an inherent degree of trust in place. This may be a naïve
assumption, but it's the assumption that's made.
Second, the OTA model actually supports a second file in addition to the JAR file containing the
application. A Java Archive Descriptor (JAD) file is required to provide a small amount of metadata about
the application. While it's possible to just download the JAR file, the JAD file lets a device and its user to
first discover information about the application's author, version, size, cost, and permanent URL location.
This gives the user the opportunity to decide whether or not to incur whatever charge (or simply take the
time) to download the application.
While this information could be displayed on a standard web page, the JAD file provides a standardized
format and protocol for exchanging metadata about applications. This, in addition to the security model,
helps to create the trusted environment to support the creation of a robust OTA economy.
Java technologies pour Palm Java tech pour Palm
LG - Lycée G. Eiffel Page 6 sur 19 29/02/2008

Which Format is Right for You?
The decision about whether to distribute your MIDlet in PRC or JAD+JAR format comes down to
considering a few questions:

What devices are you targeting? If you want your application to be used on any J2ME-ready
device, you will need to distribute it in the JAD+JAR format, since PRC is a Palm OS specific
format. If your MIDlet is designed specifically for Palm OS devices, you can choose to use the
PRC format.

How do your users get software? Applications distributed only in JAD+JAR format must be
installed by downloading them on the device. Many Palm OS users are used to downloading their
applications on the desktop then using a HotSync operation to install them. You might want to
consider making your application available in both formats, even though the PRC version won't
benefit from the OTA security model.

Do you want to look like a native Palm OS application? If you want your application to look
and feel as much like a native Palm OS application as possible, distributing it in PRC format will
make it appear in the standard Palm OS launcher with a custom icon. JAD+JAR format
applications will have a generic icon.
If you do decide to distribute your application Over-The-Air, you should ensure that your web site
provides a view that is mobile-friendly and easy to navigate. It should be all or nearly all text, should be
compact, and shouldn't require a lot of scrolling.
Note: Many mobile portals use a WAP or SMS push mechanism to trigger the download of the JAD or JAR
file. This configuration is not currently supported by WebSphere Micro Environment on Palm OS.
Therefore, at this time, it's necessary to either have a direct link to the application, email the application
to the user, or send an SMS message containing the URL for downloading the file.

Testing & Debugging
Testing Your MIDlet
Once your MIDlet is packaged and ready to install, you can either install it onto an actual Palm Powered™
device or run it on the Palm OS® Simulator. The Simulator allows you to test your J2ME application on
something that is nearly the same as testing on the real device without necessarily owning that particular
device. You can then test on a variety of configurations without having to own a large number of Palm OS
However, you should still at some point install and test your application on a real Palm OS device if you
want to be confident that your application is fully compatible.
You can download the Palm OS Simulator
, as well as a copy of the J2ME runtime for the Simulator
, from
the Palm OS Developer Pavilion.
Debugging Your MIDlet
Java technologies pour Palm Java tech pour Palm
LG - Lycée G. Eiffel Page 7 sur 19 29/02/2008

Some IDEs provide support for source-level debugging of MIDlets; for example, IBM's WebSphere Studio
Device Developer
IDE has integrated support for debugging. If your development environment doesn't
support source-level debugging, you have a couple of options.
You can manually access the Java Wire Debug Protocol (JDWP), which is a standard architecture for
remotely debugging Java MIDlets. You can use the WebSphere Micro Environment Toolkit for Palm OS
Developers to debug your application in this way. There's a tutorial on how to do this available on our
You can also use old-school console output for debugging purposes. Text sent to standard output is
directed to a file on your expansion card, located at /PALM/Programs/j9stdout.txt. Text printed to
standard error is directed to the file /PALM/Programs/j9stderr.txt.
To send text to standard output, simply use code such as the following:
System.out.print("This text will appear in the log!");
System.out.println(" And this will be appended to the
previous line, followed by a newline!");

Details on Java Technology

Learn about the architecture of Java 2 Micro Edition on Palm OS®.

Get Palm OS specific documentation for Java developers, including both general documentation and
device- and licensee-specific documentation.

Learn about the Java specifications and technologies supported on Palm OS.
Developer Resources

Find J2ME information on the Internet.
Third-Party Software

Find useful third-party libraries and frameworks to help develop great Java applications for Palm OS.

A list of useful books for J2ME programming.

Architecture of Java Technology on Palm OS®
WME for the Palm Powered™ handheld is comprised of three components: the core JVM, CLDC, and
MIDP. These components are delivered in Palm Resource (PRC) format as one or more Palm OS shared
Java technologies pour Palm Java tech pour Palm
LG - Lycée G. Eiffel Page 8 sur 19 29/02/2008

The Java Virtual Machine (JVM) is the primary layer of WME, providing the main interpreter and OS
integration layers. CLDC provides APIs for basic Java utilities, input/output, and a network connectivity
framework. MIDP adds a compact yet flexible user interface package, local record-based data
persistence, and support for TCP, UDP, HTTP, and HTTPS communication. The entire solution passes the
TCK tests from Sun Microsystems for CLDC 1.1 and MIDP 2.0 and is Java-certified.

Each layer builds upon the features offered by the layer below.
Additional JSR Support
IBM WebSphere Micro Environment already supports JSR 75 (PDA Optional Extensions) and JSR 172
(Web Services). We will evaluate implementing support for other optional packages and profiles as
needed by our device manufacturers.
Performance and Memory
WebSphere Micro Environment far exceeds the capability of J2ME MIDP and CLDC implementations on
competitors’ handheld platforms. WebSphere Micro Environment is designed to have access to the entire
dynamic and storage heap currently available on a Palm Powered device.
For example, on a Treo 600 smartphone this means up to a 3MB dynamic heap, and up to 32MB of
storage heap. A Tungsten C handheld has up to a 4MB heap, and up to 51MB of usable storage heap.
For more information on the memory in palmOne devices see the palmOne MIDP 2.0 Porting Guide,
which is available for download in our Documentation
section. WebSphere Micro Environment also
supports the ability to run MIDlet suites from an external Secure Digital (SD) storage card, with sizes up
to 1GB. Handsets from Motorola, Nokia, and Samsung are generally more limited in the memory and
storage resources they provide to MIDlet applications.
While more capable in some aspects, PersonalJava implementations running on PocketPC and Embedded
Linux devices are not compliant with J2ME standards. WebSphere Micro Environment for Palm OS is
clearly at the high-end of standards compliant Java platforms, enabling a simple application model that
can support robust applications with heavy memory, communication, and data requirements.
Java technologies pour Palm Java tech pour Palm
LG - Lycée G. Eiffel Page 9 sur 19 29/02/2008

Download documentation covering Java technology on Palm OS®.
WEME 5.7 User Guide.pdf

The WebSphere Everyplace Micro Edition User Guide. This guide covers installing the JVM on your device
or simulator, how to use the JarToPrc utility, and more. For all devices.
MIDP 2 Porting Guide.pdf

The MIDP 2.0 Porting Guide provides details on J2ME support on palmOne devices. For palmOne devices

Java Specifications and Standards
The Java technology implementation provided by PalmSource and IBM is designed to conform to all the
appropriate standards established for J2ME. WebSphere Micro Environment for Palm OS® implements the
following specifications:
Connected Limited Device Configuration (CLDC) 1.1
The Connected Limited Device Configuration (CLDC) provides the core non-GUI and database-related
APIs that Java 2 Micro Edition uses. Most of these classes and methods correspond to existing
functionality in the Palm OS platform. Subsets of the expected java.lang, java.util, and classes are
available. With CLDC 1.0 the "float" primitive, along with associated math functions and object wrapper
were not available. Floating pointing support is included in CLDC 1.1.
CLDC also provides the connection framework within the package. This connection
framework is the foundation for datagram- and stream-based connections. The MIDP library actually
provides the various common implementations with this framework.
You can get details on CLDC at
. This site includes white papers,
documentation, and much more.
Mobile Information Device Profile (MIDP) 2.0
The Mobile Information Device Profile (MIDP) is designed to extend the CLDC. MIDP 1.0 includes APIs for
networking, user interfaces, local persistence, and MIDlet life-cycle. MIDP 2.0 improves upon the MIDP
1.0 significantly with enhanced user interface, multimedia and game APIs, greater connectivity, over-the-
air (OTA) provisioning, and end-to-end security. MIDP 2.0 is backward compatible with MIDP 1.0.
MIDP is designed to provide the high-level functions required by modern applications, including the
definition of the basic application unit—in this case, the MIDlet. A MIDlet is similar to a traditional Java
applet, which is downloaded from a website by a browser, and executes within a secured J2SE sandbox.
MIDlets are loaded by the user or dynamically downloaded over the air in collections called MIDlet suites,
and are executed within a secured J2ME sandbox on the handheld device. MIDlets within the same suite
can interact with each other and their data, but not with MIDlets in other suites.
Java technologies pour Palm Java tech pour Palm
LG - Lycée G. Eiffel Page 10 sur 19 29/02/2008

A MIDlet suite maps directly to a Palm OS application, with each MIDlet suite being represented on the
launcher and assigned a creator ID, just like a Palm OS application. The first screen that is displayed is
the MIDlet chooser, listing the name of each MIDlet in the suite, and allowing the user to pick which one
to run. If there is only one MIDlet in a suite, that MIDlet is always executed by default. A MIDlet suite
with one MIDlet is the best implementation of a J2ME application on the Palm OS platform and mimics a
native Palm OS application.
The first core package is the javax.microedition.lcdui API, which is designed to implement form and
canvas-based GUI components. GUI developers canuse a Forms model, with type-validating TextField,
Images, Choice Groups, Scrollers, and more, or implement a more customized interfacing using a literally
blank Canvas subclass. This package is designed to provide both a simple way to get started quickly, and
an open-ended model to support richer interfaces such as Tables, Charts, Launchers, or even a portal-like
"Dashboard" interface. The Canvas class is also designed to be the primary foundation on which game
and entertainment content user interfaces are built. The developer implements the paint() method, and
uses the Graphics class to draw lines, rectangles, arcs, and bitmap images.

Three examples of Canvases.

Also included is support for five-way navigation control, keyboard, and stylus on devices that support
those features, as well as all other hardware buttons on the device. The Forms implementation provides
for a look and feel that is compatible with the standard Palm OS user interface, leveraging its proven
usability and functionality.
Another important component of MIDP is the Record Management System (RMS) package,
javax.microedition.rms. This API enables persistence of data locally on the device through simple record-
style methods, and is implemented on top of the Palm OS Data Manager API. However, there is not an
exact correlation between the way in which data is persisted using RMS compared to Data Manager, due
to the necessary abstraction of J2ME APIs from device-specific implementations.
Java technologies pour Palm Java tech pour Palm
LG - Lycée G. Eiffel Page 11 sur 19 29/02/2008

The format in which WebSphere Micro Environment persists data is public, meaning other Palm OS
applications or HotSync® conduits can interact with data persisted by MIDlets if necessary. As specified
in the MIDP specification, only MIDlets within the same MIDlet suite will be able to access each other’s
persisted data. Because the current Data Manager does not provide per-application encryption, any end
user or MIDlet that needs to protect sensitive data from Palm OS native applications or conduits must
utilize a third-party data encryption solution.
The third important component of MIDP on WebSphere Micro Environment is its implementation of a
number of connectors, utilizing the General Connection Framework provided by the CLDC
implementation. This includes HTTP and HTTP/S connectors for standard communication between
WebSphere Micro Environment MIDlets and remote Web or application servers. All network-based
connector implementations are built on the Palm OS NetLib APIs, and utilize the embedded RSA SSL
stack of Palm OS 5. This implementation ensure compatibility with the base network capabilities of the
devices, including support for integrated radios (GPRS, Bluetooth, and 802.11b), SSL certificate
management, and Virtual Private Network (VPN) clients.
For further details on MIDP, including documentation, visit
JSR 75 (PDA Optional Packages API)
JSR 75 provides two optional packages that implement features commonly found on PDAs and other
mobile devices supporting J2ME:

The FileConnection API provides support for using the Generic Connection Framework to access
files stored on memory cards.

The PIM Data Access API provides support for accessing native to-do list, address book, and
calendar databases, as well as support for importing and exporting standard vCard and vCalendar
Java technologies pour Palm Java tech pour Palm
LG - Lycée G. Eiffel Page 12 sur 19 29/02/2008

The design of JSR 75 was led by PalmSource in tandem with IBM.
For details on JSR 75, please visit the PDA Optional Packages Java Community Process site at
JSR 172 (Web Services API)
JSR 172 is designed to offer two optional packages for J2ME that provide the following features:

enable reuse of web service concepts when designing J2ME clients for enterprise services

provide APIs and conventions for programming J2ME clients for enterprise services

adhere to emerging Java developer community web service standards and conventions

enable interoperability of J2ME clients with web services

provide a programming model for J2ME client communication with web services, consistent with
that for other Java clients such as Java 2 Standard Edition (J2SE)
For details on JSR 172, please visit the official Java Community Process site for Web Services at

Developer Resources
The Java on Palm OS® Forum is PalmSource's official forum for discussing issues surrounding developing
Java applications targeting Palm OS devices. Visit the PalmSource forums site
to join the forum.
is IBM's "worldwide resource for developers". It is designed to be a living, breathing
community providing informative articles and news on new technologies and developments with the
computing industry. With a more vendor neutral approach than you might expect, developerWorks™ is
comprised over a number of Technology zones, including Java™, Web Services, Wireless, and even Grid
computing. It also the jumping off point for access to released products as well as advanced research and
development through alphaWorks™. The vast amount of tutorials, training materials, sample code, and
tangible example walkthroughs, make developersWorks™ a valuable reference and resource for any
developers who plans to developer for J2ME on Palm OS.
provides a unique opportunity for developers around the world to experience the latest
innovations from IBM. These emerging “alpha code” technologies are available for download at the
earliest stages of development-before they are licensed or integrated into products-allowing users to
evaluate and influence IBM research and development. In addition, early adopters have access to a
virtual collaborative community to learn more about the uses of a particular technology, and
opportunities for commercial use of alphaWorks’ technologies.
was the first, and is the largest independent publication dedicated to J2ME development. Having
built a substantial and dedicated following within the Java community, MJN has grown organically-
deriving the majority of its applications, content, and reference materials from member contributions.
Since January 2000, MJN has worked directly with developers, building strong relationships by providing
industry information and personalized support. By offering an unbiased, independent viewpoint of
technology, companies, tools, industry trends, etc., MJN has established a loyal network of technical
Java technologies pour Palm Java tech pour Palm
LG - Lycée G. Eiffel Page 13 sur 19 29/02/2008

Third-Party Software
Oracle9 iAS Wireless
offers the J2ME SDK (Software Developers Kit) to provide developers with the ability
to extend Web services to J2ME devices. The J2ME SDK lends Mobile Studio computing power to J2ME
The web services available to J2ME devices include:

Push Service: Send a message to any device via SMS, voice, and email

Location Service: Utilize driving directions, yellow pages, and maps

SQL Web Service: Access database information
J2ME SDK applications leverage the mobile network to invoke processing on the backend as seamlessly
as if it were done on the device. The Oracle9iAS Application Server acts as the backend system for J2ME
devices. The J2ME SDK comes complete with APIs, user documentation, and samples for quick J2ME
development. Register with the Online Mobile Studio today and access the J2ME SDK immediately.
Mobilizing an application could not be made easier. iBus//Mobileuses Java standards-based technology
from the backend application right through to the device. The end user benefits from reliable, secure, and
optimized communications under adverse networking conditions. In the wireless world, disconnections,
bandwidth fluctuations, and client application mobility are all commonplace. This is in stark contrast to
the fixed wire-line world of e-commerce and the Internet. When targeting this environment a developer
must take into account worst-case networking scenarios; iBus//Mobile handles this.
The Xora Offline
framework allows developers to build and deploy intelligent client applications for use in
occasionally connected environments. The Offline framework consists of the Offline client and the Offline
server, both part of the award-winning Xora EnterpriseOne Mobility platform. The Offline framework
supports J2ME, PersonalJava, and native Palm OS® application environments. The Xora Mobility
Connectors, which provide out-of-the-box deployment for leading enterprise applications such as SAP,
Oracle, Clarify, Remedy, and Siebel are integrated with the Offline framework and are available for
immediate deployment. With the intelligent Offline client on the device, mobile users can operate
seamlessly between areas of wireless coverage and dead spots. The offline client automatically detects
coverage and performs a two-way synchronization between the handheld device and the enterprise
application server.
offers a suite of award-winning mobile business solutions designed to provide mobile workers with
always-available access to applications and data from any location and from any device-even without
wireless connectivity. Aligo's applications solutions range from mobile email to highly complex field force
automation, empowering mobile workforces by ensuring continuous accessibility to the business
infrastructure. At the core of Aligo's technology is the award-winning Aligo M-1 Mobile Application Server,
a mobile business platform that guarantees availability and speed, enforces security, and maximizes
scalability for every solution.
PointBase Micro
is a platform-independent Java relational database optimized to run on the J2ME CDC
and CLDC/MIDP and J2SE platforms. It has an ultra-compact footprint (<45K for J2ME MIDP) and can be
easily embedded within a Java application, making it transparent to users from the time of deployment.
PointBase Micro is ideal for notebooks, PDAs, and emerging Java-enabled devices. It provides effective
Java technologies pour Palm Java tech pour Palm
LG - Lycée G. Eiffel Page 14 sur 19 29/02/2008

data management for rapid and efficient mobile enterprise applications created by software vendors,
systems integrators, and corporate IT departments.
Impronto Developer Kit
for Palm OS makes creating wireless applications easy by hiding complex
Bluetooth protocols behind standard Java APIs for Bluetooth Wireless Technology (JABWT). A wireless
application written with Impronto will run on any standard Java Bluetooth platform.

Simplifies testing

Reduces application development time

Reduces development costs

Supports J2SE and J2ME

Works with any JABWT-compliant implementation 100% Pure Java

Simulates a complete JABWT environment without Bluetooth hardware or stacks

Runs actual application code in simulated mode

Cuts application development time

Reduces Bluetooth learning curve

Prevents dependencies on proprietary technology

Protects applications from dependencies on low-level Bluetooth stack technology

Runs applications on Bluetooth devices that support Java

Includes industry-leading WebSphere Micro Environment (J9) from IBM

Deploys Java applications built with Impronto Simulator

J2ME Books
Title: Enterprise J2ME: Developing Mobile Java Applications
Author(s): Michael Juntao Yuan
Release: October 4, 2003

Title: J2ME Game Programming
Author(s): Martin Wells
Release: October 2003

Title: Programming Bluetooth Devices With J2Me
Author(s): C. Bala Kumar, Tim Thompson, Paul Kline
Release: September 2003

Title: J2me Complete Class Library: Programming for Mobile Devices with CDROM
Author(s): Guy Lotgering
Release: August 2003

Title: MIDP 2.0 Style Guide for the Java 2 Platform, Micro Edition
Author(s): Cynthia Bloch, Annette Wagner, Cindy Bloch
Release: June 10, 2003

Title: Programming Wireless Devices with the Java Platform, Micro Edition, Second Edition
Author(s): Roger Riggs, Antero Taivalsaari, James Peursem, Jyri Huopaniemi
Release: June 10, 2003

J2ME Component Marketplace
Java technologies pour Palm Java tech pour Palm
LG - Lycée G. Eiffel Page 15 sur 19 29/02/2008

One of the most valuable benefits of J2ME support is participation in a true component marketplace, full
of both open-source projects and commercially licensed products that provide enhanced functionality on
top of the core virtual machine. Furthermore, WME enables third-party vendors to provide additional
shared libraries, extending its functionality using either Java code or native Palm OS® code.
A perfect example of this is the Bluetooth support provided by Rococo Software
. Rococo has implemented
the JSR for Bluetooth on J2ME, utilizing the underlying Palm OS Bluetooth stack included with many Palm
OS handhelds and palmOne™ Bluetooth SDIO expansion cards, in their Impronto Developer Kit
. The
Rococo solution can be licensed and bundled with applications that need Bluetooth capability, and
executed on a device with WME.
IBM also provides a number of extensions that are designed to be compatible with WME. DB2 Everyplace
the mobile version of IBM's popular DB2 database platform, provides a lightweight, embedded relational
database that can be accessed by MIDlets through a JDBC-style API and synchronized to any backend
database that supports the JDBC standard. PointBase
and Oracle
offer competitive mobile database
products with their own unique approaches and implementations. Likewise, MQ Everyplace
provides a
mobile extension of the MQSeries messaging bus, providing reliable, secure, asynchronous messaging
between a MIDlet and critical business functions.
gives you full control of the serial port. MathFP
is an open-source package that provides a new
Math class supporting Floating Point calculations on CLDC 1.0. TinyLine
supports advanced rendering with
a MIDP Canvas using the Simple Vector Graphics (SVG) standard, a powerful method to deliver dynamic
or static drawings, presentations, charts, or other vector-based graphics content. Bouncy Castle Crypto

implements a wide variety of open cryptographic standards and methodologies for both the J2ME and
J2SE environment. This is a critical example where an end-to-end cryptographic system for password
protected access to or encryption of data can be implemented on both client and server using the same
core package and API.

Frequently Asked Questions
Here are the answers to some of the questions developers most often ask us about Java development on
Palm OS®.
Q. Which Java Specification Requests (JSRs) are implemented in WebSphere Micro
A. Connection Limited Device Configuration (CLDC) 1.1 and Mobile Information Device Profile (MIDP) 2.0.
WME also supports JSR 172 (Web Services) and JSR 75 (PDA Optional Packages). These aren't installed
by default on all platforms, and may need to be installed by users before using your software.
Please see
for more information on these specifications.
Q. Where can I download WebSphere Micro Environment and the toolkit?
A. To download the WebSphere Micro Environment JVM, visit our Get Java Technology section to locate
the files for your device. You can download a copy of the JVM designed for use in the Palm OS Simulator

through the Palm OS Developer Pavilion.
Java technologies pour Palm Java tech pour Palm
LG - Lycée G. Eiffel Page 16 sur 19 29/02/2008

You can download the Java technology for Palm OS Garnet Toolkit
through the Palm OS Developer
Pavilion. A free account is required. This toolkit includes the tools needed to build MIDlets for Palm OS,
including the JarToPRC tool, and documentation on how to use the tools.
Q. How much Storage and Dynamic Heap are available on various devices?
A. Each device offers a different amount of Storage and Dynamic Heap. As always, using the
System/Runtime and RMS calls to programatically check the amount of available memory is the best
solution. WebSphere Micro Environment can take advantage of the complete memory space available for
both dynamic and storage heap, so there is no built in artifical limit of 64k, as there was with Sun's MIDP
for Palm OS. However, the total Dynamic Heap is shared between the Operating System, Libraries
Loaded-in Memory (Network Stack, Alarms, Background Functions), the J2ME Runtime (WebSphere Micro
Environment), and the MIDlet Suite itself.
Calls to Runtime.totalMemory() and .freeMemory() methods will return to the current memory allocated
to the MIDlet Application. The total memory will grow as the MIDlet requires more, up to the total
amount currently available on the device. While this does mean the totalMemory() and freeMemory()
calls are rendered mostly useless, the large amount of available memory ensures that virtually all MIDlets
will run without memory issues.
Q. What media formats are supported by WebSphere Micro Environment on Palm OS?
A. The MIDP 2.0 release supports the Portable Network Graphics (PNG) format for graphics. Color depth
is up to 16-bit and transparency is supported.
The MIDP 2.0 release also supports WAV files up to 16-bit, 44.1khz stereo for audio support. However,
these files are limited by the HotSync 64kb per resource limit. Larger resources can be split and
reassembled using some preprocessing code, or applications can be installed wirelessly "over the air"
bypassing the 64kb limit.
Q. Does PalmSource plan to add support for additional JSRs in the future?
A. PalmSource and IBM are investigating support for other JSRs, such as Wireless Messaging, Mobile
Media, and Bluetooth. However, there have been no official announcements at this time.
Q. How can my Java application use traditional Palm OS features such as IR Beaming,
Categories, and Address Book lookup?
A. J2ME development is not intended to exactly replicate all capabilities available not native Palm OS
applications written in C or C++. Our strategy is to support the use of industry-standard Java
Specification Requests ("JSRs" - see to promote interoperability between J2ME-compliant
The PDA Optional Extensions package (JSR 75) is designed to support interaction with a devices Address
Book, Calendar, and To Do List. The use of Categories with an RMS persistent data record can easily be
implemented by setting a simple bit on each record.
Infrared data transfer is quickly being replaced be either wireless messaging over WAN networks or
through Bluetooth-based device transfer. J2ME standards support these capabilities, as well, and
Java technologies pour Palm Java tech pour Palm
LG - Lycée G. Eiffel Page 17 sur 19 29/02/2008

PalmSource will work diligently to expand its support for additional JSRs beyond CLDC and MIDP. You
can, however, use serial communication connectivity to send and receive raw data via the infrared port.
Q. Which Integrated Development Environments (IDEs) support development for WebSphere
Micro Environment?
A. Our favorite IDE for developing Java MIDlets for Palm OS is IBM's WebSphere Studio Device Developer
5.7 or later. You can download a trial edition of this from:
The WebSphere Micro Environment Palm Developer Toolkit which is available from PalmSource can be
integrated into other tools through build scripts (i.e. using ANT), and through use of the included
debugger proxy, which allows a third-party debugger which uses Java Debug Wire Protocol (JDWP) to
connect to the WebSphere Micro Environment debugger running on a simulator or an actual device.
Q. Is there a standalone toolkit available for WebSphere Micro Environment seperate from
IBM's WebSphere Studio Device Developer?
A. Yes. The WebSphere Micro Environment Toolkit for Palm OS
provides two components for use by
developers with any J2ME compliant development environment. The JarToPRC tool takes a MIDP-
compliant JAD and JAR file, and allows the developer to output a Palm OS PRC file with Palm-style
naming and icons. This means J2ME MIDlet Suites can look to an end-user just like an normal Palm OS
application. The toolkit also includes a standalone debugger proxy which allows any Java Debug Wire
Protocol (JDWP) compliant Debugger connect to the WebSphere Micro Environment running on a Palm OS
Emulator, Simulator, or an actual Palm OS device.
The WebSphere Micro Environment Toolkit for Palm OS is available free of charge through the Palm OS
Developer Pavilion.
Q. What is the difference between the Palm OS Emulator (POSE) and the Palm OS Simulator?
Palm OS 4.x devices and earlier all used an Emulator which emulated the Motorola Dragonball 68k
Processor and used actual device ROMs. Palm OS 5.x devices and beyond use a Simulator, which runs on
top of Win32 x86 environment as if it's an ARM processor. Fortunately, the general Java/J2ME developer
does not have to worry about this. Your MIDlets will run without change on either type of test

Tungsten W = Tungsten W Palm OS Emulator (POSE)

Tungsten Tx or C = Palm OS 5.x Simulators

Treo 600 or 650 = Palm OS 5.x Simulators
Developers should download the specific device Emulator or Simulator through the manufacturer's web
site if possible in order to test for a specific device. The manufacturer provides simulators tuned to more
accurately simulate specific devices with the proper skins and/or ROMs for each device. You may also use
the generic Palm OS Simulator provided by PalmSource, which is available through our developer
program at
Q. How can I debug with WebSphere Micro Environment running on a Palm OS device,
emulator, or simulator?
Java technologies pour Palm Java tech pour Palm
LG - Lycée G. Eiffel Page 18 sur 19 29/02/2008

A. WebSphere Studio Device Developer provides support for an integrated debugging experience between
the IDE and a device or simulator. If you are using another IDE which supports the Java Debug Wire
Protocol (JDWP), than you can utilize the debugger proxy component of the WebSphere Micro
Environment Toolkit for Palm OS
Q. What size icons should I use for the large and small icons when building my MIDlet as a
A. For high-resolution devices, the large icon size is 44x44 and the small icon size is 18x30. For low-
resolution devices, the large icon size is 22x22 and the small icon size is 9x15.
Q. What types of Connections within the General Connection Framework (GCF) are supported
by WebSphere Micro Environment?
A. Socket, Datagram, Serial (COMM over Hardware, IR, Bluetooth), HTTP, and HTTPS.
Q. Why is HTTPS supported on all the Tungsten devices except for the Tungsten W?
A. The HTTPS Connection is implemented using the RSA SSL Stack that is only available in Palm OS 5.2
and beyond. The Tungsten W used Palm OS 4.1 and the Tungsten T uses Palm OS 5.0.
Q. How does WebSphere Micro Environment compare to Sun's MIDP for Palm OS?
A. The latest release of WebSphere Micro Environment for Palm OS supports MIDP 2.0 and CLDC 1.1, and
is a Native ARM runtime executable. Sun's MIDP for Palm OS is a 68k or PACE application (runs on ARM
through emulation) and only supports MIDP 1.0 and CDLC 1.0 at a low resolution. Feature improvements
include more available dynamic and storage heap, support for five-way navigation hardware, LCDUI
tuning, and additional Connections available through the GCF.
Performance has been improved significantly. Please
for more information on J2ME
performance rankings.
Also, WebSphere Micro Environment can support library extensions by PalmSource partners. This means
more native functionality will be available as add-ons to the JVM in the future. This includes IBM's DB2
Everyplace, MQSeries Everyplace, and Rococo's Software's implementation of the Bluetooth JSR.
Q. Can my application synchronize data from WebSphere Micro Environment to a remote
enterprise server?
A. There are many vendors who provide products that enable synchronization of data from mobile J2ME
clients to enterprise servers. These include IBM's DB2 Everyplace and MQSeries Everyplace components,
PointBase Micro, and Aligo's Omni Mobile Platform.
You can also utilize HTTPS to simply send and receive XML data (either in HTML or SOAP form) from any
enteprise server available on the internet.
Finally, utilizing built-in or third-party VPN services on Palm OS devices, you can further secure access to
that data.
Java technologies pour Palm Java tech pour Palm
LG - Lycée G. Eiffel Page 19 sur 19 29/02/2008

Q. How can I utilize Web Services in an application built for WebSphere Micro Environment?
A. WebSphere Micro Environment includes support for JSR 172, the Web Services API. This is a
standardized API for web services support.
You can also use the open-source KSOAP and KXML libraries to easily build applications that utilize SOAP
and XML for Web Services. PalmFolio, a sample application and source code has been posted on the
Lessons and Samples page.
Q. Does WebSphere Micro Environment support cryptography or encryption?
Yes, the environment supports a number of cryptographic technologies. First, HTTP over SSL is supported
by the HTTPS Connector. This utilizes the underlying RSA SSL Library provided by Palm OS. Second, all
application signing functions required by MIDP 2.0 are implemented. Finally, open-source libraries, such
as Bouncy Castle's Crypto APIs also can be used.
Q. How does this runtime stack up against Java clients already available for Pocket PC and
A. WebSphere Micro Environment fares very well against competing JVM technology in terms of features,
usability, and performance.
RIM: RIM was designed for email, Palm OS devices are designed as a platform for applications –
consumer and enterprise. RIM also forces the developer and/or user to choose whether to use a C/C++
device (the 950/957 line) or Java (the new GPRS based products). Our approach allows both the direct
Palm OS APIs to be accessible through C/C++, and MIDP/CLDC to be available through Java. Developers
can choose which is the best approach for themselves.
PPC: HP only bundles on high-end devices, using Insignia, now `Esmertec, Jbed/Jeode. They do have to
the ability to use .NET extensions. They do have VM but do not have all the benefits of a Palm Powered™
device, and therefore can’t leverage the power of the Palm OS.
Handsets: They’re a part of our ecosystem and great allies. But, we’re also excited about what we’re
going to be able to do with our form factors, great screen quality, power and flexibility. Palm OS devices
also have more memory, larger screens, better multimedia, and more wireless options.
Q. I want to develop Java applications for a device that doesn't support the WebSphere Micro
Environment JVM. How can I do this?
A. There are alternative Java or Java-like environments available for Palm OS. Sun provides a MIDP 1.0
environment for Palm OS
that is designed to work on 68k-based Palm OS devices. SuperWaba
is a Java
compatible (but not Java-certified) environment that is designed to work on Palm OS 2.0 and later.
PalmSource doesn't provide support for developers using these environments, but they are options that
may work for you.