A written, ubiquitous slogan has driven the popularity of the Java programming language, but it does not apply in the Java Micro Edition (Java ME) world. Device features such as screen size, color depth, and memory are significantly different. You must select the configuration file, configuration, and J2ME APIs, and you will encounter what we call device fragmentation issues. This tutorial describes how to use the IDE's built-in features to troubleshoot Java ME MIDP device fragmentation issues.
Demand
Before you begin, you need to install the following software on your computer:
Java Standard Development Kit (JDK) version 5.0 or 6.0
NetBeans IDE 6.0 with mobility package
Note: You can use the Sun Java Wireless Toolkit (Wireless Toolkit) that shipped with the mobility pack to deploy this project. You do not have to use other software to perform the basic concepts described in this tutorial. However, if you need to deploy to another platform, we recommend that you download the appropriate emulator that you want to adjust. The following are some of the most popular CLDC/MIDP device platforms available:
Nokia Series SDKs for Symbian OS
Nokia Series SDKs for Symbian OS
Sony Ericsson SDK 2.2.4 for the Java ME platform
Motorola Java ME SDK v6.4 for Motorola OS products
If you are not aware of the NetBeans Mobility Pack or Java ME development, it is recommended that you read the NetBeans Mobility Pack 6.0 for CLDC Quick Start Guide before continuing this tutorial. This guide includes chapters on adding and registering platform emulators.
Setting up the Application
This example uses a simple game called Ball Shot, which explains how to adjust device capabilities to solve device fragmentation problems.
Download Ballshotgame.zip Project
Unzip the project and place the content in the IDE's Project_home directory.
For more instructions on importing the mobility project into the IDE, see the Mobility Project Import Guide.
Create a custom configuration
One strategy for resolving device fragmentation issues is based on the project configuration of NetBeans use. This allows you to create a set of source code and customize each mobile device that you want to adjust. Note Keep your configuration consistent so that the emulator platform and target device correspond to the project configuration you want to create. In the following example, Nokia Series 40 is the target configuration.