Latest web development tutorials

Eclipse run the program

Run Java programs

We can view Package Explorer

You can quickly run a Java program in the Package Explorer view.

Package Explorer view:

Right-click the package java class good selection of main function Run As> Java Application

Similarly, you can also select the class that contains the main method in the Package Explorer view and press the shortcut keys: Alt + Shift + X, J

The following two methods can create a new Run Configuration (running configuration) we can use it to start a Java application.

If you run the configuration has been created, you can select the Run menu Run Configurations to launch a Java application, click on the name of the runtime configuration, then click the button to run Java applications.

run1

Run Run menu option to restart a previous launch Java applications.

run_program_2

Restart previously started Java application shortcut Ctrl + F11.