在Eclipse中构建现有的Java项目时遇到问题 [英] Having a problem in building an existing java project in eclipse

查看:99
本文介绍了在Eclipse中构建现有的Java项目时遇到问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要在日食中导入一个现有项目。我收到此错误,不知道如何解决。我正在寻找建议...

I am importing an existing project in my eclipse. And I am getting this error, don't know how to fix it. I am searching for advice if any...

以下是显示的错误:


Java构建路径问题

*所需库的存档:项目'C *** ch2'中的'.project'被读取或不是有效的ZIP文件*
错误屏幕截图

*Archive for required library: '.project' in project 'C***ch2' cannot be read or is not a valid ZIP file* screenshot of errors

.classpath

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="src"/>
    <classpathentry exported="true" kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v7.0">
    <attributes>
        <attribute name="owner.project.facets" value="jst.web"/>
    </attributes>
    </classpathentry>
    <classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
   <classpathentry exported="true" kind="lib" path=".project"/>
   <classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/Java SE 11.0.1 [11.0.1]">
    <attributes>
        <attribute name="owner.project.facets" value="java"/>
    </attributes>
   </classpathentry>
 <classpathentry kind="output" path="build/classes"/>

.project

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>C***ch2</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
    <buildCommand>
        <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
        <arguments>
        </arguments>
    </buildCommand>
    <buildCommand>
        <name>org.eclipse.jdt.core.javabuilder</name>
        <arguments>
        </arguments>
    </buildCommand>
    <buildCommand>
            <name>org.eclipse.wst.common.project.facet.core.builder</name>
        <arguments>
        </arguments>
    </buildCommand>
    <buildCommand>
        <name>org.eclipse.wst.validation.validationbuilder</name>
        <arguments>
        </arguments>
    </buildCommand>
</buildSpec>
<natures>
    <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
    <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
    <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
    <nature>org.eclipse.jdt.core.javanature</nature>
    <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>

推荐答案

该消息是说.project文件不是有效的库。它不是jar文件,也不是包含类文件的文件夹结构的目录。从项目的Java构建路径中删除该条目。

The message is saying that the .project file isn't a valid library. It's not a jar file or a directory containing a folder structure of class files. Remove that entry from your project's Java Build Path.

这篇关于在Eclipse中构建现有的Java项目时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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