MyEclipse项目转成Eclipse项目

来源:互联网 发布:手机 java 编程 编辑:程序博客网 时间:2024/05/21 16:56

MyEclipse项目转成Eclipse项目

这2个最主要的区别在于Myeclipse的web工程文件是WebRoot,eclipse的Web工程是WebContent。具体操作步骤如下:

1.请首先确保你的eclipse是javaee版本的,或者已经安装wtp插件。

2.然后修改eclipse工程下的.project文件,修改之前最好先备份一下。

3.在<natures></natures>中加入

<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>

4.在<buildSpec></buildSpec>中加入

<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>

5.刷新项目,项目->右击->Properties->ProjectFacets,选择Java和Dynamic Web Module配置。

点击Apply应用即可。


6.在擦做完5之后,点击Furtherconfiguration available修改配置Context Root 和Content Directory 以及源码路径,在 Myeclipse中默认的Content Directory是WebRoot,而eclipse中默认的是WebContent,所以这里需要将WebContent修改成WebRoot。


 

0 0
原创粉丝点击