A project is a group of source files and the settings with which you build, run, and debug those source files. In the IDE, all Java development has to take place within a project. Within a MIDP project, you can create multiple project configurations that customize your MIDlet for different types of mobile devices.
The IDE builds its project infrastructure directly on top of Apache Ant, the leading build tool for Java applications. The IDE stores all of the information about your project in an Ant script, a properties file, and a few XML configuration files. This means that you can build and run your projects outside of the IDE exactly the same as inside the IDE.
When a project is created, the IDE:
The MIDP project structure is similar to that of standard NetBeans projects.
There are differences, however, in the build
and dist
folders to accommodate the MIDP build process.
Logical View
The logical view of the project, shown in the Projects window, provides a hierarchy of sources and resources which reflects the type of project and its contents.
By right-clicking on the project node, you can choose the following Mobility-specific menu items:
The Source Packages node encapsulates all the Java packages of the project. Right-clicking on the Source Package node and choosing New lets you add new file templates to your application.
The Resources node encapsulates all resources and libraries of the active configuration.
The IDE notifies you through a note on the node if the active configuration
inherits resources and libraries from DefaultConfiguration
.
Right-clicking the Resources node enables you to add Project, JARs, folders, and libraries as resources for your application. You can not add or remove inherited resources.
Right-clicking on the Project Configurations node opens the Add Configuration wizard, which enables you to create new configurations for your project.
Files View
When a project is created, the following folders are created under build
(shown in the Files window):
compiled.
Contains all compiled classes.preprocessed.
Holds the source files after they are preprocessed.
The files will differ from the original source files if you are using project
configurations. obfuscated.
Holds the obfuscated versions of the class files.preverified
. Holds the preverified versions of the class files.
These files are packaged into the distribution JAR of your project. preverifysrc
.Versions of the source files before they are preverified.