Problem with Java Buildpath in Eclipse
Asked Answered
J

4

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

Jacquelynnjacquenetta answered 5/5, 2011 at 15:36 Comment(3)
>> Has anyone an idea why eclipse say that the library is required because the library was deleted soon.Argenteuil
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.Argenteuil
You delete the library and this library is required for the project to compile , so eclipse must complaint it.Inna
H
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.

Horvitz answered 5/5, 2011 at 15:42 Comment(6)
the libary isnt listet there but my problem is still thereJacquelynnjacquenetta
@bladepit: well, if the error is "Project 'XX' is missing required library: ...", then you probably have to add that library in the project Build PathHorvitz
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?Kapoor
@Kapoor Try to remove the library and add it again, and then refresh the project (or close it an re-open it)Horvitz
@Horvitz worked like a charm. Didn't even need to refresh. Thanks!Kapoor
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.Undershot
I
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.

Isfahan answered 9/7, 2014 at 8:45 Comment(4)
Solution 3 finally fixed my problem. For me the only working solution.Aldarcy
I had this problem for a .jar that plainly was there. Closing the project and opening it solved it. Thank you.Beowulf
Solution 3 worked for me as well! Finally the project ran after 3 daysMerchant
Solution 3, closing/reopening the projects was needed before the build path errors could resolve. Thank you.Zohar
D
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.

Deerskin answered 14/3, 2013 at 17:52 Comment(1)
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!Obe
D
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.

Diploblastic answered 5/5, 2011 at 15:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.