在eclipse中为非必需库缺少必需的库 [英] Missing required library in eclipse for non-required library

查看:691
本文介绍了在eclipse中为非必需库缺少必需的库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Eclipse for Java Develepers(Juno x64在Windows 7上运行)。



我有一个项目,我正在尝试一个jar我不再需要(args4j),所以删除了依赖关系。在某些时候,我的电脑意外失去了电源,我已经重新启动了Eclipse。



我的项目现在有一个错误,Project'MyProject '缺少必需的库:'/path/to/args4j-2.0.21.jar'。在删除依赖关系后,我正在处理该项目一段时间,没有任何问题。



在项目属性> Java构建路径下,没有任何参考args4j



我尝试过:




  • 搜索字符串args4j 在我的项目中的所有文件中,但没有匹配。在< workspace> \.metadata\.plugins\org.eclipse.core.resources\.history\ c $ c>,但是我很害怕触摸他们,因为我可能会打破别的东西。

  • 清洁重建没有任何效果。



有没有人有任何想法为什么Eclipse正在抱怨,我可以做些什么来解决它?

解决方案

如果没有解决您的问题,请执行以下操作,请跳到下一个:


  1. 在项目文件夹中检查 .classpath 文件。您可能有一个参考。

  2. 关闭并重新打开项目而不关闭eclipse,这可能会重建Eclipse资源缓存。

  3. 重新打开后建立。

  4. 将项目重新导入干净的工作区。


I'm using Eclipse for Java Develepers (Juno x64 running on Windows 7).

I have a project in which I was trying out a jar I no longer need (args4j), so have removed the dependency. At some point, my PC lost power unexpectedly, and I've since restarted Eclipse.

My project now has an error, "Project 'MyProject' is missing required library: '/path/to/args4j-2.0.21.jar'". I was working with the project for some time after removing the dependency without any issues.

Under the Project Properties > Java Build Path, there's no reference to args4j in any of the tabs.

I've tried:

  • searching for the string "args4j" in all files within my project, but there are no matches. There are a bunch of references within <workspace>\.metadata\.plugins\org.eclipse.core.resources\.history\, but I'm reticent to touch them out of fear I might break something else.
  • [Edit] clean rebuild has no effect.

Does anyone have any idea why Eclipse is complaining, and what I might be able to do to fix it?

解决方案

Please do the following, if one does not solve your problem, skip to the next one:

  1. Check .classpath file in your project folder. You might have a reference there.
  2. Close and re-open the project without closing eclipse, this might rebuild Eclipse resource cache.
  3. Make a clean build after re-opening.
  4. Re-import your project into a clean workspace.

这篇关于在eclipse中为非必需库缺少必需的库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆