Java Build Path

buildeclipsejavapath

When I open eclipse I got 1 Java Build Path Problem:
Build path specifies execution environment JavaSE-1.6. There are no JREs installed in the workspace that are strictly compatible with this environment.

Now I tried looking through the answers and other question, but all the answers are based on the already acquired knowledge about programming and such. Please help me fix this problem step by step.

Best Answer

Your problem is that the Eclipse project is already configured to work on version 6 of the system libraries. You however do not seem to have this specific version, therefore you need to reconfigure the build path for the project.

In order to change your JRE System Library, you must

  1. Go to Project|Properties
  2. Choose the Java Build Path section
  3. Select the current JRE System Library, and choose Remove
  4. Select Add Library, and under the JRE System Library category pick your system library; you probably just need to choose the Workspace default JRE

If the default JRE version is <= 4, you most likely will have problems building the project. In that case I suggest you install a more recent JRE.

More generally, under Window|Preferences, you can check Java|Installed JREs|Execution Environments to know which of the installed JREs match a specific execution environment. Should be pretty clear, but that page demystifies things a bit.