views:

87

answers:

2

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?

+1  A: 

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.

nanda
A: 

The Java Runtime Library was defined wrong for the pulled project.

It had to be reset under Project | Properties | Java Build Path | Libraries.