With
, you typically have one project that contains the application main
class and several projects containing class libraries. You can run the main
project or run any individual project that contains an executable class.
To run the main project:
Choose Run > Run Main
Project (F6).
To run an individual project:
Right-click the project's node in the Projects window and choose Run Project.
If you have the Save on Compile 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 will be 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.