Running the Examples

This page describes three different ways you can try out the examples from the book.

On Your Mobile Phone

You will need to figure out the best way to transfer the applications to your phone. You might be able to transfer the .jar files to the phone via Bluetooth or USB cable, or you might need to install the applications on a web server.

Your phone might not have support for some of the APIs that are presented later in the book. However, any phone with MIDP 2.0 support should run the examples from Chapter 3 through Chapter 11, Chapter 14, and Chapter 18. In addition, Chapter 21 and Chapter 23 include special versions of the examples that should run on any MIDP 2.0 device.

Using NetBeans Mobility

Download the zip file for a chapter. Unzip it to a location of your choice. In NetBeans, chooseFile > Open Project.. from the menu. Navigate to the project and open it. You can run the project by choosing Run > Run Main Project or pressing F6.

Using the Sun Java Wireless Toolkit

Download the zip file for a chapter. Unzip it to the apps folder under the toolkit’s installation directory.

For example, if the toolkit is installed in c:\WTK2.5.1, and you’ve downloaded the examples from Chapter 11, unzip the file to create the directory c:\WTK2.5.1\apps\kb-ch11. Now, in KToolbar, open the kb-ch11 project. Run the project by clicking Run.