This topic describes common tasks you can perform with projects. For more detailed information, click the links in the right column.
To perform this task |
Follow these steps |
Create a project. |
- Choose File > New Project (Ctrl-Shift-N).
- Select the right template for your
project.
|
Add a JAR file to a standard project's classpath. |
- In the Projects window, right-click the Source Packages node for the
project and choose Properties. The IDE opens the Project Properties
dialog box in the Compiling
Sources page.
- Click Add JAR and select the JAR file in the file chooser.
If you also want to attach source code and Javadoc for the JAR file,
click Add Library instead.
|
Set up compilation dependencies between projects. |
- In the Projects window, right-click the Source Packages node for the
project and choose Properties.
- Click Add Project
and select the project folder for the project that you want to add to
the classpath.
|
Open required projects. |
- In the Projects window, right-click the project node and choose Open
Required Projects.
|
Do a fresh build of a project. |
|
Run a project. |
- Choose Run > Run Main Project
(F6) or right-click any project node and choose Run Project.
|
Debug a project. |
- Choose Run > Debug Main Project
(Ctrl-F5) or right-click any project and choose Debug Project.
|
Specify sources for a JAR file on the project classpath. |
- Choose Tools > Libraries from the main menu.
- If the JAR file is not already registered in the Library Manager,
create a new empty library using the Add Library button.
- Select the library in the left panel of the Library Manager.
- In the Classpath tab, click Add JAR/Folder and specify the location
of the JAR file containing the compiled class files. A library can contain
multiple JAR files.
- In the Sources tab, add the
folder or archive file containing the source code.
|
Specify Javadoc for a JAR file on the project classpath. |
- Choose Tools > Libraries from the main menu.
- If the JAR file is not already registered in the Library Manager,
register the JAR file as described above.
- In the Javadoc tab, click
Add ZIP/Folder and specify the location of the Javadoc files.
|
Set the main project. |
- Right-click the project node and choose Set Main Project.
|