简体   繁体   中英

Problem with Java Buildpath in Eclipse

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

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.

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 ie 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.

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM