Running Program

Running a Java Program

The quickest way to run a Java program is by using the Package Explorer view.

In the Package Explorer view −

  • Right click on the java class that contains the main method.
  • Select Run As → Java Application.

The same action can be performed using the Package Explorer view by selecting the class that contains the main method and clicking Alt + Shift + X, J.

Either actions mentioned above create a new Run Configuration and use it to start the Java application.

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

Java Application

The Run item on the Run menu can be used to restart the java application that was previously started.

Restart Java Application

The shortcut key to launch the previously launched Java application is Ctrl + F11.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *