Contents Previous Next Index

Chapter   1

Customizing the Wireless Toolkit


The JavaTM 2 Platform, Micro Edition Wireless Toolkit (J2METM Wireless Toolkit) provides an emulation environment for the development of applications compliant with the Mobile Information Device Profile (MIDP).

The Java 2 Platform, Micro Edition Wireless Toolkit Basic Customization Guide provides technical details for configuring the toolkit to accommodate new device emulators.

This chapter gives an overview of customizing the J2ME Wireless Toolkit and includes the following topics:

Chapter 2, “Creating Device Property Files” presents a tutorial on how to adapt the device definitions in J2ME Wireless Toolkit for a new device.

Chapter 3, “Examining Device Property Files” describes in more detail the components of a device definition and how to create your own device definition.

How to Customize the Wireless Toolkit

One of the major benefits of the J2ME Wireless Toolkit is its ability to be customized: it can be readily adapted to provide a platform for developing Java applications that can run on many different devices, even from different manufacturers.

To do this, the J2ME Wireless Toolkit provides a Default Emulator that can be easily customized to provide high-fidelity emulation for many devices. The appearance and behavior of an emulated device is defined in the Default Emulator by a set of device property files, which contain the device’s images and property definitions. Thus, you can add a new device by simply creating a new set of device property files.

Customization Steps

You customize the J2ME Wireless Toolkit for a new device in three simple steps:

  1. Obtain the default J2ME Wireless Toolkit.
  2. The toolkit includes a default development environment and a Default Emulator. The Default Emulator is supplied with sets of device property files that enable the emulation of several generic wireless devices.

  3. Create new device property files.
  4. A company that wants to have applications developed for specific devices using the toolkit can modify the device property files and use them with the Default Emulator.

  5. Add the new device property files to the J2ME Wireless Toolkit.
  6. The set of device property files that was created for an additional device is copied to the folder in the J2ME Wireless Toolkit's installation that contains device definitions. The new device is automatically added to the device list.


Note – If you need to customize the J2ME Wireless Toolkit in a way that cannot be achieved by producing a new set of device property files alone, please contact Sun Microsystems, Inc. for information about additional possibilities of customizing the J2ME Wireless Toolkit. Send email to wtk-comments@sun.com.

Device Property Files and the Default Emulator

The Default Emulator is the customizable device emulator supplied with the J2ME Wireless Toolkit. It contains the engine used to emulate J2ME applications, along with a highly configurable front end.

The basic definition of a device to be emulated by the Default Emulator is contained in its Main Device Property file. The Main Device Property file covers such features as the size of the screen that is emulated, the locations of image files used to display the device, and the active areas within these images that are used to represent buttons. Other device property files are also used to define a device's characteristics in the Default Emulator; these are mainly image files containing the device's image and images of any on-screen icons that are used in the device's emulation.

A device definition's Main Device Property file is located in the wtklib\devices subdirectory of the J2ME Wireless Toolkit's installation directory. Within the
wtklib\devices directory, each emulated device X has a directory X containing a Main Device Property file named X.properties.

For example, suppose the J2ME Wireless Toolkit is installed in the directory C:\WTK21. Then, the Main Device Property File for the device DefaultColorPhone is located at C:\WTK21\wtklib\devices\DefaultColorPhone\DefaultColorPhone.properties.

For the remainder of this document, {j2mewtk.dir}, denotes the installation directory of the J2ME Wireless Toolkit.

 


Contents Previous Next Index Basic Customization Guide
Java™ 2 Platform, Micro Edition, Wireless Toolkit, Version 2.1