Myeclipse导入项目。

Eclipse导入项目提示No projects are found to import解决办法

Eclipse提示找不到HttpServlet类

myeclipse解决中文乱码

从Myeclipse 导入到eclipse中无法识别为 web项目 问题的解决步骤

有时候  我们导入myeclipse软件中,myeclipse不认识,是因为项目没有myeclipse的项目文件,我们需要自己造一个。然后重新刷新即可。

普通的java项目

把这两个文件直接扔到项目目录下即可。

注意:.project 的   <name>demo</name>   demo换成你自己的项目名字。

 .classpath

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/OSGi%Minimum-1.2"/>
    <classpathentry kind="output" path="bin"/>
</classpath>

.project

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
    <name>demo</name>
    <comment></comment>
    <projects>
    </projects>
    <buildSpec>
        <buildCommand>
            <name>org.eclipse.jdt.core.javabuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
    </buildSpec>
    <natures>
        <nature>org.eclipse.jdt.core.javanature</nature>
    </natures>
</projectDescription>

web项目

 这里面坑很多。

项目只需要src和WebContent 文件即可。.settings文件是自己生成的,不用管。下面两个项目文件  我们自己手动创建。记住。资源目录名字 要起WebContent   因为myeclipse默认是他,比如idea默认是  web。哎  都是坑啊

.project  文件如下,.classpath用上面的即可!!!!!

.project  

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
    <name>student-jdbc-jsp</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.validation.validationbuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
    </buildSpec>
    <natures>
        <nature>com.genuitec.eclipse.ast.deploy.core.deploymentnature</nature>
        <nature>org.eclipse.jdt.core.javanature</nature>
        <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
        <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
        <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
        <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
    </natures>
</projectDescription>

然后  项目上点右键,刷新项目

在项目上点右键,进入属性(properties)

在左侧列表项目中点击选择“Project Facets”,在右侧选择“Dynamic Web Module”和"Java",并选择相应的版本

还是在 这个界面,选中,这时,选择列表下面会出现“ Further Configuration availabe ” 的链接,点击这个链接,设置src 和 out path, 下一步,就是 Web Module 的设置了,第一项所说,更改 Content Directory 名字为你的 webRoot 目录名字即可。

项目出现地球就成功了。

垃圾myeclipse,希望看见此文章的同学赶紧换idea。

原文地址:https://www.cnblogs.com/coder-lzh/p/13332823.html