How to set build path in eclipse IDE?

Proper build path is required for compiling and building java project.

Method 1:
1. Right Click on your project folder, Choose Build Path > Configure Build Path

Or

Right Click on your project folder, Choose Property > Java Build Path

For both case you will the find the same option panel like:

 
2. Select “JRE System Library” and select Edit from the right side bar

3. Choose your right Version of java installed

And hit finish and Refresh the project

Method 2:

1. Step 1 is Same as the previous method

2. Select Libraries Tab and delete any arbitrary library present there.
3. Click on Add Library option, Select JRE System Library and click Next.

4. Select the option Workspace default JRE and click Finish.


5. Hit Finish

Right click on project and select Refresh.