14

In eclipse I have an error related to my build path.

The error:

Project 'XX' is missing required library: 'middlegen-2.1.jar'

But the library is deleted before the build path configuration.

Is there perhaps a problem with cache or so?

Has anyone an idea why eclipse say that the library is required even though the library was deleted before the build path configuration.

With Best

3
  • 1
    >> Has anyone an idea why eclipse say that the library is required because the library was deleted soon. Commented May 5, 2011 at 15:38
  • Doesn't Eclipse doing the correct thing? You removed the libaray which is used by some project XX. Am I missing something here? Could you please post more details. Commented May 5, 2011 at 15:42
  • You delete the library and this library is required for the project to compile , so eclipse must complaint it. Commented May 5, 2011 at 15:42

4 Answers 4

25

I guess you've deleted the library from a directory, but you've not updated the project Build Path. Right click on the project name, select "Properties", go to "Java Build Path", choose the "Libraries" tab, and see that your library is not in the list. If it's still in that list, remove it with the "Remove" button.

Sign up to request clarification or add additional context in comments.

6 Comments

the libary isnt listet there but my problem is still there
@bladepit: well, if the error is "Project 'XX' is missing required library: ...", then you probably have to add that library in the project Build Path
I have a similar problem. the library IS listed under libraries but uses a different, valid path. Sounds like eclipse has a stale reference to a library somewhere. Any idea what files to check?
@Chris Try to remove the library and add it again, and then refresh the project (or close it an re-open it)
@MarcoS worked like a charm. Didn't even need to refresh. Thanks!
|
13

This error is due to probably either missing required library or due to caching of eclipse

Solution 1

  1. Open project explorer window.
  2. Right click on the project and goto Buildpath -> ConfigureBuildPath
  3. Under the libraries tab check whether all the used jar files are physically located in the directory/web application library.If something is showing "RED X" mark then fix them by either putting the jar in the place or remove it or add it newly using add JARs

Solution 2

1.Try cleaning the project's using Menu->Project->clean (select the projects and clean it)

Solution 3

If your build path is very clear i.e no Red "x" marks then the error could be of eclipse caching.Then do below step

1.Right click on the project choose "close project". 2.Once the project is closed again right click on the project select open project This solution will clear the eclipse cache.

Hope any of the solution should resolve your problem.

4 Comments

Solution 3 finally fixed my problem. For me the only working solution.
I had this problem for a .jar that plainly was there. Closing the project and opening it solved it. Thank you.
Solution 3 worked for me as well! Finally the project ran after 3 days
Solution 3, closing/reopening the projects was needed before the build path errors could resolve. Thank you.
7

I had this same problem, but the steps above didn't help. I did a search through files in the Eclipse workspace and found files named .markers and .markers.snap that contained the bad path names under the folders in .projects that were named for the projects that weren't building. I exited Eclipse, backed up those files, removed them from the Eclipse workspace, and restarted Eclipse. The problem went away.

1 Comment

Thank you very much. I was about to jump out of the window; as I exited my eclipse now 10 times; and cleaned all, and rebuild, bla blub ... and still saw such errors. Now I erased one single .marker file; and all fine again!
0

Your project configuration includes a reference to middlegen-2.1.jar on the build path. That file is missing. You can either a) put the file there, b) change the configuration to point to the file in another location, or c) remove the reference, cross your fingers, and hope the project compiles and runs without the jar.

I don't know what "the library was deleted soon" means, so if that is important to your question, you might want to rephrase.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.