This topic describes common tasks you can perform in the NetBeans IDE
BlueJ Edition after you have created a project.
For more detailed information on these tasks, click the links
provided or browse the rest of the IDE's help.
To perform this task |
Follow these steps |
Create a new file. |
- Choose File > New File.
- In the wizard, select a file type from one of the categories
and complete the wizard.
|
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).
|
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.
|
Clean a project (delete compiled classes and other artifacts of
the built 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 files created by the build. |
- Open the Files window (Windows > Files) and 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.
|
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.
|
Set the project main class |
- Right-click the project node in the Projects window and choose Properties.
- Select the Run node in the Categories pane.
- Type the fully qualified name of the class in the
Main Class field.
|
Set the runtime arguments (arguments to the program's main method). |
- Right-click the project node in the Projects window and choose Properties.
- Select the Run node in the Categories pane.
- Enter the arguments in the Arguments field.
|
Set the runtime classpath. |
- Right-click the project node in the Projects window and choose Properties.
- Select the Libraries node in the Categories pane.
- Click Add Project, Add
Library,
or Add JAR/Folder.
|
Set JVM arguments. |
- Right-click the project node in the Projects window and choose Properties.
- Select the Run node in the Categories pane.
- Type a space-separated list of arguments in the VM Options field.
|
Set the working directory for execution. |
- Right-click the project node in the Projects window and choose Properties.
- Select the Run node in the Categories pane.
- Type the full path to the working directory in the Working Directory
field.
|
Run a project. |
- Choose Run > Run
Main Project (F6) or right-click any project in the Projects window
and choose Run Project.
|
Run a single file.
|
- Select one or more files in the Projects window, Files window, or
Source Editor.
- Choose Run > Run
File > Run
Class from the main menu.
|