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

camiloqp
  • 1,140
  • 5
  • 18
  • 34
bladepit
  • 853
  • 5
  • 14
  • 29
  • 1
    >> Has anyone an idea why eclipse say that the library is required because the library was deleted soon. – Pravin May 05 '11 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. – Pravin May 05 '11 at 15:42
  • You delete the library and this library is required for the project to compile , so eclipse must complaint it. – Ken Chan May 05 '11 at 15:42

4 Answers4

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.

MarcoS
  • 13,386
  • 7
  • 42
  • 63
  • 6
    the libary isnt listet there but my problem is still there – bladepit May 10 '11 at 13:55
  • @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_ – MarcoS May 10 '11 at 14:58
  • 1
    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 Jun 13 '12 at 11:49
  • 1
    @Chris Try to remove the library and add it again, and then refresh the project (or close it an re-open it) – MarcoS Jun 13 '12 at 16:48
  • @MarcoS worked like a charm. Didn't even need to refresh. Thanks! – Chris Jun 14 '12 at 18:52
  • I have similar problem , in the "Build Path" it says "No actions Available", in the Confiugaration it does not show "Add Scala Nature ", how can i Solve this problem please help me. – BdEngineer Jun 18 '17 at 19:30
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.

CyanAngel
  • 1,240
  • 1
  • 14
  • 28
prem
  • 843
  • 1
  • 8
  • 21
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.

blackcatweb
  • 1,003
  • 1
  • 10
  • 11
  • 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! – GhostCat May 26 '15 at 13:06
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.

Isaac Truett
  • 8,734
  • 1
  • 29
  • 48