Issue
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.
- 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?
Solution
Some times eclipse becomes naughty following steps should be taken to nicely add the jar library in project
First remove the library from libs folder
Also remove the refrence from java build path in external library tab
Clean the project let it actually realize the library is missing :D
Again copy the jar file in libs folder
Add the refrence of library in java build path library tab
set the priority of this library to top (important) because its possible the order of library export is not ok in your project
Clean the project and build
hope so it will solve your problem
Answered By - Zain Ul Abidin
Answer Checked By - Dawn Plyler (JavaFixing Volunteer)