Juno - Java 构建路径 - 项目无法读取或不是有效的 ZIP 文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13183355/
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
Juno - Java Build Path - project cannot be read or is not a valid ZIP file
提问by Rafa? Developer
I am getting this error:
我收到此错误:
Description Resource Path Location Type Archive for required library: 'src/Program.java' in project 'Home' cannot be read or is not a valid ZIP file Home Build path Build Path Problem
说明 资源路径位置类型 所需库的存档:项目“Home”中的“src/Program.java”无法读取或不是有效的 ZIP 文件 Home 构建路径 构建路径问题
What is causing this error and how do I fix it?
是什么导致了这个错误,我该如何解决?
回答by Yogendra Singh
Please follow the navigation as below:
请按照以下导航:
Right Click(project) -> Java Build Path ->Libraries
Fix all the entries there with red cross
mark in the front. You also may want to remove them and add them fresh using remove
and add
button in the right of the wizard.
用red cross
前面的标记修复那里的所有条目。您可能还想删除它们并使用向导右侧的remove
和add
按钮重新添加它们。
回答by dan
Can you check, if src/Program.java
is not among your libraries entries (Java Build Path ->Libraries
)?
There, you should include only jar
files and directories, not source (.java
) files.
您能检查一下,如果src/Program.java
不在您的库条目 ( Java Build Path ->Libraries
) 中吗?在那里,您应该只包含jar
文件和目录,而不是源 ( .java
) 文件。
回答by vanz
I was with the same problem. For solve it I removed the problematic lib and I added it again
我遇到了同样的问题。为了解决它,我删除了有问题的库并再次添加了它
回答by marc
Here is another of those mentioned fixes:
这是提到的另一个修复:
My build system (Gradle) added a required native library (dll) to the Eclipse build path (Right Click on Project -> Properties -> Java Build Path -> Libraries). Telling the build system not to add the native dll library to the Eclipse classpath solved the problem.
我的构建系统 (Gradle) 将所需的本机库 (dll) 添加到 Eclipse 构建路径(右键单击项目 -> 属性 -> Java 构建路径 -> 库)。告诉构建系统不要将本机 dll 库添加到 Eclipse 类路径解决了这个问题。
回答by Sandeep vashisth
Right Click on Project -> Properties -> Java Build Path -> Libraries -> remove struts.xml