About Standard Projects
See Also
The IDE contains a set of standard project templates for Java SE applications
and web applications. Standard Java projects offer the highest integration
with the IDE's support of certain technologies.
The standard distribution of the IDE contains the following standard templates:
- For Java SE applications:
Java
Application. An empty Java SE project with a main class.
Java
Desktop Application. A skeleton application that is based on the Swing Application
Framework and contains a menu bar, status bar, and About box.
This template also provides basic application infrastructure such as
persisting of window state and resource management. With this template,
you can also generate code to create a GUI interface for a database table.
Java
Class Libary. An empty Java class library with no main class.
Java
Project with Existing Sources. A Java SE project with existing sources.
- For web applications:
Web
Application. An empty web application.
Web
Project with Existing Sources. A web application with existing sources.
- For EJB modules:
EJB
Module. An empty EJB module.
EJB
Module with Existing Sources. An EJB module with existing sources.
- For enterprise applications:
Enterprise
Application. An empty enterprise application.
Enterprise
Application with Existing Sources. An enterprise application with
existing sources that conform to the Sun Java BluePrints Guidelines.
- For NetBeans modules:
Module.
An empty module with a layer.xml file and a Bundle.properties
file. You use a module to implement the logic that integrates the library
wrappers into the platform and provides a user interface for receiving
user input.
Library
Wrapper. A library wrapped in a module project and a Bundle.properties
file. You use a library wrapper to put a library JAR file on a module's
classpath and export some or all of the JAR file's packages from the module
as public packages.
Module
Suite. An empty module suite. You use a module suite to group and
deploy a set of interdependent modules and library wrappers.
- Depending on what modules you have installed, your
IDE may contain additional templates. Consult the help for your additional
modules for more information.
Source Folders
In standard projects, you can have multiple source folders and multiple JUnit
test folders for each Java SE, web, and EJB project. A single source folder cannot,
however, be added to more than one project. If you need a source folder to be
part of several projects, you should create a separate project for the source
folder and add it to the classpath of each of your projects.
Project Settings
When you create a project from a standard project template, the IDE generates
an Ant script that controls all aspects of program compilation, execution, and
debugging.
You can set basic project settings in the Project Properties dialog box by
right-clicking a project node in the Projects window and choosing Properties.
All changes are immediately registered in the project's Ant script. You can
also set more complex options by editing the project's Ant script and properties
file directly.
The Project Folder
Each standard project has a project folder where the IDE stores the Ant script,
project metadata, and output folders. In projects with existing sources, you
can place the project source directories in the same location as the project
folder or in a separate location. In empty projects, the source root is always
in the same location as the project directory.
The following table lists the contents of a project folder:
Item |
Description |
build.xml |
The build script called by the IDE. This build script only contains an
import statement that imports targets from nbproject/build-impl.xml.
Use the build.xml to override targets from build-impl.xml
or to create new targets.
|
nbproject |
The directory that contains the project Ant script and other metadata.This
directory contains:
- build-impl.xml. The IDE-generated Ant script. You should
never edit build-impl.xml directly always override its
targets in build.xml.
- project.properties. Ant properties used by the IDE to configure
the Ant script. Although you can edit this file manually, you generally
do not need to, as it is automatically updated by the IDE when you configure
the project's properties.
- project.xml and genfiles.properties. IDE-generated
metadata files. Although you can edit project.xml manually,
for standard projects you generally do not need to. You should never
edit genfiles.properties.
|
nbproject/private |
The directory that holds properties that are defined for you only. If
you are sharing the project over VCS, any properties you define in private.properties
are not checked in with other project metadata and are applied only to your
installation of the IDE. |
build |
The output directory for compiled classes. |
dist |
The output directory of packaged build outputs (JAR files and WAR files).
Standard Java projects produce one build output per project. The dist
directory also contains generated Javadoc documentation. |
- See Also
- About Free-Form Projects
- Managing the Classpath
- Customizing the IDE-Generated Ant Script
Legal Notices