You can compile, run, and debug projects with commands from the Project menu.
To compile a project:
Compile
Project (Ctrl-Shift-F9).
All uncompiled classes and files with out-of-date .class files in the Project window are compiled. Any classes that these compiled classes are dependent on are also compiled. Classes that are mounted in the Filesystem window but not added to the Projects window are not compiled.
![]() |
The Project window is not open by default. You can
open the Project window by choosing
Window Project. |
To delete all .class files in a project and compile all classes:
Build
Project (Ctrl-Shift-F11).
All classes in the Project window and the classes they are dependent on are compiled from the source files.
You can also compile and build by class or directory by right-clicking a node in the Filesystems window and choosing the appropriate command.
To run a project:
Set
Main Class (Ctrl-Shift-M). A list of classes that you have added to the project
appears. Set the class in the Select Project Main Class dialog box.
Execute
Project (Ctrl-Shift-F6).You can also run a class by right-clicking its file node and choosing Execute (F6).
![]() |
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 Filesystems window and choosing
Tools Add to Project. |
To debug a project:
Debug
Project (Ctrl-Shift-F5).You can also debug a class by selecting its file node and choosing Debug
Start
Session
Run in Debugger
(Alt-F5).
| 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 a Java Program Running a Java Program Starting a Debugging Session |
|