Specifying the Main Class to Run for a Project
From the main window, choose Project
Set Main Class (Ctrl-Shift-M).
In the Select Main Class dialog box, select the class that contains the main method.
Click OK.
See also
Compiling, Running, and Debugging a Project
Legal Notices