Easy Tutorial
❮ Eclipse Shortcuts Eclipse Java Build Path ❯

Running Programs in Eclipse


Running Java Programs

We can quickly run Java programs in the Package Explorer view.

Package Explorer View:

Right-click the Java class containing the main function and select Run As > Java Application.

Alternatively, you can select the class containing the main method in the Package Explorer view and press the shortcut keys: Alt + Shift + X, J.

Both methods will create a new Run Configuration which we can use to start the Java application.

If a run configuration has already been created, you can start the Java application by selecting Run Configurations from the Run menu, clicking the name of the run configuration, and then clicking the Run button for the Java application.

The Run option in the Run menu can restart a previously started Java application.

The shortcut key to restart a previously started Java application is Ctrl + F11.

❮ Eclipse Shortcuts Eclipse Java Build Path ❯