eclipse 移动我的工作区目录位置后“缺少构建路径条目”

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

"Build path entry is missing" after moving my workspace directory location

eclipsejarclasspathbuildpath

提问by user2763361

I use Eclipse and manually moved my workspace (cut and paste) from /home/user/workspaceto /home/user/somefolder/workspace.

我使用Eclipse和手动移动我的工作区(剪切和粘贴)/home/user/workspace/home/user/somefolder/workspace

I rebooted Eclipse and I get build path errors. I open up the build path of one of the projects with this error and see Build path entry is missing: home/user/workspace/SomeProject/lib/cloning-1.9.0.jar.

我重新启动了 Eclipse,但出现了构建路径错误。我打开出现此错误的项目之一的构建路径并查看Build path entry is missing: home/user/workspace/SomeProject/lib/cloning-1.9.0.jar.

This is clearly a bug in eclipse since I told it where my new workspace was located when i rebooted. How do I fix this (without doing it manually for one Jar since it's an error with many).

这显然是 eclipse 中的一个错误,因为我在重新启动时告诉它我的新工作区所在的位置。我如何解决这个问题(不用手动为一个 Jar 做这个,因为它有很多错误)。

回答by nitind

This can happen if you added it to a Java Buildpath as an External jar--it then recorded on the on-disk location rather than the in-workspace path. The Java Build Path is stored in the .classpath files in each project. If necessary, you can use Search->File to do a search and replace.

如果您将其作为外部 jar 添加到 Java Buildpath 中,则可能会发生这种情况——然后将其记录在磁盘位置而不是工作区路径中。Java 构建路径存储在每个项目的 .classpath 文件中。如有必要,您可以使用 Search->File 进行搜索和替换。