By default, Eclipse builds your project's code automatically after every saved modification. It uses a customized internal compiler with some interesting features, such as executing a class even when it contains errors and incremental compilation (which allows compiling just parts of the project). After the modifications have been recompiled, it can highlight the problems with the code on the fly. You can see a list of these errors in the Problems view. If the view is not currently visible in the workspace, you can open it by navigating to Window | Show View | Problems.
However, if you are working on a project that's too big, or if you are using a machine with low resources, automatic building can slow things down. To disable it, click on Project and unmark the Build Automatically option. Once you do this, the project will only be built when you navigate to Project | Build Project or Project | Build All.
To run your project, select it in the Package Explorer view, and click on the green play button in the toolbar, or select Run from the Run tab. This will launch your project without any further configuration. If your project contains a class with a public static void main(String[] args)
method, it will be executed. If more than one class contains it, you will be able to choose which one you wish to run. You can see the output of your program (if there is any) in the Console tab.
If your project needs customizations, such as arguments or a specific classpath configuration to run, you can create a launch configuration to meet these needs. For this, navigate to Run | Run Configurations. The following screenshot shows the launch configuration window:
On the left-hand side of the Run Configurations window, you have a list of all the launch configuration categories. To create a new launch configuration for a Java project, double-click on the Java Application category. If you have already run your application once with the Run button, there will be a default configuration in this category.
By selecting the configuration, you will be presented with the tabs that contain the launch configurations. A brief description of what each tab contains is as follows: