Java programs may be launched in either run or debug mode.
To launch a Java program:
If you want to debug the program first, in the top menu bar select the Run > Debug As > Java Application
Otherwise, select Run > Run As > Java Application
If you selected a Java program, your program is now launched in the mode you selected, and the launch appears in the Debug view.
If you selected a Java project, you may be prompted to select the class you wish to launch. Only those classes that define a main method are available to select. If only one class with a main method is found in the project, that class is automatically chosen. The chosen class is launched in the mode you selected.
You can launch a program without first selecting it in the Packages or Navigator view. For example, if the active editor is open on the program you wish to launch, you can select Run > Debug As > Java Application or Run > Run As > Java Application
You may also launch a program using a launch configuration type other than Java Application.
To do this, select a program or project in the Package Explorer, then select the launch configuration type you wish to use from the menu options under Run > Debug As in the top menu bar.
Java views
Java editor
Debugger
Connecting to a
remote VM with the Java Remote Application launcher
Relaunching a
program
Running and
debugging
Setting execution
arguments
Stepping through
the execution of a program