This topic describes common tasks you can perform when building a project.
For more detailed information, click the links in the right column.
To perform this task |
Follow these steps |
Add a JAR file to a project's classpath. |
- Open the Project Properties dialog box by
right-clicking the project node and choosing Properties from the Project
window.
- Select the Libraries node in the Categories pane. Then click the
Compile tab.
- Click Add JAR and select the JAR file in the file chooser.
|
Add an IDE project to a project's classpath. |
- Open the Project Properties dialog box by right-clicking the project
node and choosing Properties from the Project window.
- Select the Libraries node in the
Categories pane. Then click the Compile tab.
- Click Add Project and select
the project directory for the project you want to add.
|
Build a project. |
- Select the node of the project you want to build.
- Choose Build > Build
Main Project (F11) or right-click any project in the Projects window
and choose Build Project.
|
Stop building a project. |
- Choose Build > Stop Build/Run from the main menu.
|
Compile a single file. |
- Select the node of the file you want to build.
- Choose Build > Compile
File (F9).
|
Clean a project. |
- In the Projects window, right-click the project node and choose Clean
Project.
|
Clean and build the main project. |
- Select the node of the project you want to clean and build.
- Choose Build > Clean
and Build Main Project (Shift-F11).
|
View build output. |
- In the Files window, expand the project folder node.
- Expand the build folder to view compiled classes.
- Expand the dist folder to view Javadoc
files and built libraries, such as JAR files and WAR files.
|
Correct compilation errors. |
- In the Output window, double-click
any Java syntax error to jump to the location in the source code where
the error occurred.
- In the Output window, double-click
any Ant error to open the Ant script in the target that failed.
|