java 为什么会显示此 Eclipse 错误以及应该如何解决

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/27737968/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-02 12:19:02  来源:igfitidea点击:

why this eclipse error showing and what should be the solution for it

java

提问by Rasmita jena

Missing library: xdoclet-1.2.1.jar. Select the home directory for XDoclet. 1.2.1

缺少库:xdoclet-1.2.1.jar。选择 XDoclet 的主目录。1.2.1

why this eclipse error showing and what should be the solution for it alz

为什么会出现这个 eclipse 错误,以及它的解决方案是什么 alz

回答by Leo

It is causing possibly because that jar is not added to your project build path. Follow this steps:

这可能是因为该 jar 未添加到您的项目构建路径中。请按照以下步骤操作:

Right click on project(in the package explorer) 
-> Buid Path 
-> Configure Build Path 
-> Java Build Path
-> Libraries tab
-> Add JARs button

Then locate the folder where the jar resides. You can filter your search by typing *.jarin the search field. And then click ok.

然后找到jar所在的文件夹。您可以通过*.jar在搜索字段中输入来过滤搜索。然后点击确定。

回答by ZuberFowler

I downloaded the xdoclet-lib-1.2.3.zip file from: http://sourceforge.net/projects/xdoclet/files/xdoclet/1.2.3/unziped it to its folder name, xdoclet-1.2.3, and then from the Eclipse (I was using 4.5) preferences JavaEE -> XDoclet tab selected the Version 1.2.3 and then the Browse button to the xdoclet-1.2.3 folder. Apply and OK and Eclipse error goes away.

我从以下位置下载了 xdoclet-lib-1.2.3.zip 文件:http: //sourceforge.net/projects/xdoclet/files/xdoclet/1.2.3/将其解压缩 到其文件夹名称 xdoclet-1.2.3,然后从 Eclipse(我使用的是 4.5)首选项 JavaEE -> XDoclet 选项卡选择版本 1.2.3,然后浏览按钮到 xdoclet-1.2.3 文件夹。应用并确定,Eclipse 错误消失。

Saying all that, I suspect you don't really need it unless you know that you are using xdoclet. If that's the case and it was intentionally left out then the error message should be fixed in Eclipse. I only went around fixing it because of the message.

综上所述,我怀疑您并不真正需要它,除非您知道您正在使用 xdoclet。如果是这种情况并且有意将其排除在外,则应在 Eclipse 中修复错误消息。我只是因为消息而四处修理它。

回答by vinsinraw

If have maven version of the project, can also try by updating the project. I also had this XDoclet. 1.2.1.jar complaint, which got resolved once I update the project.

如果有maven版本的项目,也可以通过更新项目来尝试。我也有这个 XDoclet。1.2.1.jar 投诉,在我更新项目后得到解决。

Right Click Project > Maven > Update Project ... > Check the projects > OK.

右键单击项目 > Maven > 更新项目 ... > 检查项目 > 确定。

回答by Deepak Sharma

Please add maven dependency in your project . Steps are - 1- Right Click on Project 2- select configure build path 3- select library tab 4- add library and select Maven Dependencies 5- apply and Apply and Close .

请在您的项目中添加 maven 依赖项。步骤是 - 1- 右键单击​​项目 2- 选择配置构建路径 3- 选择库选项卡 4- 添加库并选择 Maven 依赖项 5- 应用和应用并关闭。