Java eclipse 错误:说构建路径不完整

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/31213002/
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-08-11 10:48:00  来源:igfitidea点击:

eclipse error: says build path is incomplete

javaeclipsejarweka

提问by Bharthan

Jars used in the projectDescription :

项目中使用的jars描述 :

Type The project was not built since its build path is incomplete.

Cannot find the class file for weka.core.Instance.

Fix the build path then try building this project.

类型 项目未构建,因为其构建路径不完整。

找不到 weka.core.Instance 的类文件。

修复构建路径,然后尝试构建此项目。

It is not an android code, also do I need to post some code too. I think code is irrelevant for this error

它不是android代码,我也需要发布一些代码。我认为代码与此错误无关

Tried this solution: Right click on project -> Properties -> Java Build Path (From Left List) -> Libraries (Tab) -> Add Library (Button on right) -> JRE System Library -> Next -> Workspace default JRE -> Finish

尝试过这个解决方案:右键单击项目-> 属性-> Java 构建路径(从左侧列表)-> 库(选项卡)-> 添加库(右侧按钮)-> JRE 系统库-> 下一步-> 工作区默认 JRE- > 完成

given in similar question on stackoverflow for Android Project - Didn't work.

在关于 Android 项目的 stackoverflow 的类似问题中给出 - 没有用。

采纳答案by Jodevan

It says it all: there's a missing library in your class path. Try downloading the jar from hereand add it to your class path. If you're using maven, gradle, etc., even simpler, just use the code provided in the previous link for each tool.

它说明了一切:您的类路径中缺少一个库。尝试从这里下载 jar并将其添加到您的类路径中。如果你用的是maven、gradle等,更简单的,就用前面链接中提供的每个工具的代码即可。

回答by Awais

It may have several reasons. Simplest of the solution is that

它可能有几个原因。最简单的解决方案是

  • Find out the .m2location for your Eclipse Maven (where jars are resolved) for mine case it is under C:\Users\Awais Haider\.m2\repository(issue lies here).

  • Delete the repository section, once there is no other solution.

  • Force update maven and its snapshot and clean the project.
  • Once the updates and download of maven dependencies are completed, the error will be resolved.
  • 找出.m2您的 Eclipse Maven的位置(解决 jars 的位置),用于我的案例C:\Users\Awais Haider\.m2\repository(问题出在这里)。

  • 删除存储库部分,一旦没有其他解决方案。

  • 强制更新 maven 及其快照并清理项目。
  • 一旦maven依赖的更新和下载完成,错误就会得到解决。