Figure 11.1 shows the Sun Java Wireless Toolkit©used to develop wireless applications that are based on Java ME's CLDC and MIDP. The toolkit includes the emulation environments, performance optimization and tuning features, documentation, and examples that developers need to bring efficient and successful wireless applications to market quickly. The following steps show how to develop an MIDP application, in this case a simple "Hello, World!" program, under Microsoft Windows XP:
Download and install Sun Java Wireless Toolkit 2.3 Beta, which includes a set of tools and utilities and an emulator for creating Java applications that run on handheld devices, at the URL (http://java.sun.com/products/sjwtoolkit/download-2_3.html).
Run the development environment KToolbar of an MIDlet, an MIDP application, as shown in Figure 11.1 by selecting the following Windows options:
Start ⇒ All Programs ⇒ Sun Java Wireless Toolkit 2.3 Beta
⇒ KToolbar
Create a new project by giving a project name such as HelloSuite and a class name such as HelloMIDlet as shown in Figure 11.2. After the project HelloSuite is created, the KToolbar will display the message shown in Figure 11.3, which specifies where the Java source files, application resource files, and application library files are to be put.
Build the project by clicking on the "Build" button. The "Build" includes compilation and pre-verifying.
Run the project by clicking on the "Run" button. An emulator will be popped up that displays the execution results of the built project. For example, Figure 11.5 shows an emulator displays the execution results of HelloSuite.
Upload the application to the handheld device using USB cables, infrared ports, or Bluetooth wireless technology.