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:

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