Oracle® Java Micro Edition Software Development Kit Developer's Guide Release 8 for Windows E50624-01 |
|
Previous |
Next |
A project is a group of files comprising a single application, including source files, resource files, XML configuration files, automatically generated Apache Ant build files, and a properties file.
When a project is created, the Oracle Java ME SDK 8 performs the following tasks:
Creates a source tree
Sets the emulator platform for the project
Sets the project run and compile-time classpaths
Creates a build script that contains actions for running, compiling, debugging, and building Javadoc
The Oracle Java ME SDK 8 and NetBeans IDE 8.0 create their project infrastructure directly on top of Apache Ant. An Oracle Java ME SDK 8 project can be opened and edited in NetBeans IDE 8.0. With the Ant infrastructure in place, you can build and run your projects within the Oracle Java ME SDK 8 or from the command line.
NetBeans IDE provides two views of the project:
The Projects tab provides a logical view of the project.
The Files tab displays a physical view of the project.
Project settings are controlled in the project Properties window. To open the Properties window, right-click on an item or subitem in the project tree and select Properties.
The project provides a basic infrastructure for development. You provide source files, resource files, and project settings as needed. Most project properties can be edited later.
To create a Java ME project:
Open the File menu and select New Project.
In the Choose Project window, select the Java ME Embedded category, and the Java ME Embedded Application project type. Click Next.
In the Name and Location window, specify a project name and any other settings. The default values are usually fine. Click Finish.
By default, the new project contains an IMlet class that extends the javax.microedition.midlet.MIDlet
class. This class can be used as the main IMlet. To add another IMlet to the project:
Right-click the project, select New, and then MIDlet.
Specify the name of the IMlet, its location within the selected project, and other settings. Click Finish.
When the new IMlet is created, the Oracle Java ME SDK 8 automatically adds it to the project's Application Descriptor File.
Oracle Java ME SDK 8 projects use standard NetBeans IDE 8.0 debugging utilities. See the NetBeans help topic, Debugging Tasks: Quick Reference. This topic includes links to a variety of debugging procedures.
If you have an external device that runs a supported runtime you can perform on-device debugging. The device must be detected by the Device Manager and be present on the Device Selector, as described in Chapter 5, "Working with Devices."