With
, you typically have one project that contains the application main
class and several projects containing class libraries. You can run the
project or run any individual project that contains an executable class.
To run a project:
Select the project that you want to run in the Projects window.
Choose Run > Run Project (F6).
Notes.
If you have the Compile on Save option selected in the Compiling section of
the Project Properties window, the project will be run directly from the
build/classes directory of your project. If Compile on Save is not
selected, the project is run using the project's build script.
If you run a project for which you have not specified a main class,
the IDE prompts you for the main class. You can change this setting in
the Run panel of the project's Project Properties dialog box.
Each project can only contain one main class.
If you are running a project often you can set a project as the main project by
choosing Run > Set Main Project from the main menu and selecting the project in the sub-menu
or by right-clicking the project node in the Projects window and choosing Set as Main Project.
You can select multiple projects in the Projects window and run them at once by choosing Run > Run (number of selected projects) Projects (F6) from the main IDE's menu.