Project is missing required library - but correct JAR exists?

Viewed 13246

One of my eclipse projects gives me the Project X is missing required library: 'somelib.jar' error, but when I go to Configure Build Path > Libraries the library is present, and no error is indicated there.

I tried the usual things:

  • Clean build (all projects in the workspace)
  • Exited eclipse multiple times

My coworkers, using the same git checkout with the same status as mine, and also using eclipse Neon2, have no build errors.

Just to be sure, I navigated into the corresponding directory and removed a different jar file, and when I look at my build path configuration that jar shows up with a red "x" indicating that the library is missing.

I checked that somelib.jar sits in the expected place and is a valid JAR file.

How do I fix this?

3 Answers

If you have multiple projects opened in such way that one depends on another, and the problematic project depends on others, refreshing all dependent projects will fix the 'missing library' issue for the main project.

Related