Compiling, Running, and Debugging a Project

See Also 

You can compile, run, and debug projects with commands from the Project menu.

To compile a project:

To force compilation of all files in a project:

To run a project:

  1. If you have not set the main class, choose Project and choose Set Main Class. A list of classes that you have added to the project appears. Set the class in the Select Project Main Class dialog box.
  2. Choose Project and choose Execute Project.
Note If a class does not appear in the Select Project Main Class dialog box, it has not been added to the project. You can add a class to a project by right-clicking its node in the Explorer and choosing Tools and choosing Add to Project.

To debug a project:

  1. Set a breakpoint in your program.
  2. Choose Project and choose Debug Project.
Tip You can also compile and build by class or by directory. Right-click a node in the Explorer and choose the appropriate command. You can run a class by right-clicking its file node and choosing Execute. You can debug a class by selecting its file node and choosing Debug and choosing Start Debugging.
See Also
Projects in the IDE
Creating a New Project
Adding an Existing File to a Project
Adding a New File to a Project

Compiling Java Programs
Running Java Programs
Debugging Programs

Legal Notices