Eclipse – Red exclamation mark in Eclipse with mercurial

eclipsemercurial

I have imported a project with Mercurial (hg clone …).
When opening it with Eclipse, a red exclamation mark appears by the project's name in the Project Explorer, and it cannot be built. Silly messages like "import java.util cannot be resolved" appear, and errors in files are not marked in the Package Explorer.

How can I resolve this?

Best Answer

Check the problem view. By exclamation it is usually means a problem with build path

Check the Build Path of the project by right clicking the project and select Build Path -> Configure Build Path.

One problem I often encountered is different people using different Java SDK and so when the exact SDK is not available in your machine, you need to change to your Java SDK (via JRE System Library -> Alternate JRE). A better way to avoid this problem is to always select the JRE System Library from Workspace default JRE or Execution Environment.