Eclipse 中的 Java Buildpath 问题

发布于 2024-11-05 14:17:34 字数 246 浏览 2 评论 0原文

在 Eclipse 中,我有一个与我的构建路径相关的错误。

错误:

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

但是在构建路径配置之前删除了库。

是不是缓存或者其他方面有问题?

有谁知道为什么 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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

勿忘心安 2024-11-12 14:17:34

我猜您已从目录中删除了该库,但尚未更新项目构建路径。右键单击项目名称,选择“属性”,转到“Java 构建路径”,选择“库”选项卡,可以看到您的库不在列表中。如果它仍在该列表中,请使用“删除”按钮将其删除。

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.

甚是思念 2024-11-12 14:17:34

此错误可能是由于缺少所需的库或由于 eclipse

解决方案 1

  1. 打开项目资源管理器窗口的缓存所致。
  2. 右键单击该项目并转到 Buildpath ->配置构建路径
  3. 在库选项卡下检查所有使用的 jar 文件是否物理位于目录/Web 应用程序库中。如果某些内容显示“RED X”标记,则通过将 jar 放在该位置或删除它或新添加它来修复它们使用添加 JAR

解决方案 2

1.尝试使用菜单->项目->clean 清理项目(选择项目并清理它)

解决方案 3

如果您的构建路径是非常清楚,即没有红色“x”标记则错误可能是 Eclipse 缓存的错误。然后执行以下步骤

1。右键单击项目选择“关闭项目”。
2.项目再次关闭后右键单击项目选择打开项目
此解决方案将清除 eclipse 缓存。

希望任何解决方案都能解决您的问题。

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.

‘画卷フ 2024-11-12 14:17:34

我也遇到了同样的问题,但上述步骤没有帮助。我搜索了 Eclipse 工作区中的文件,发现名为 .markers.markers.snap 的文件在 .projects 的文件夹下包含错误的路径名 以未构建的项目命名。我退出 Eclipse,备份这些文件,从 Eclipse 工作区中删除它们,然后重新启动 Eclipse。问题就消失了。

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.

奈何桥上唱咆哮 2024-11-12 14:17:34

您的项目配置包括对构建路径上的 middlegen-2.1.jar 的引用。该文件丢失了。您可以 a) 将文件放在那里,b) 更改配置以指向另一个位置的文件,或者 c) 删除引用,祈祷项目能够在没有 jar 的情况下编译和运行。

我不知道“库很快被删除”是什么意思,所以如果这对您的问题很重要,您可能需要重新表述。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文