为了账号安全,请及时绑定邮箱和手机立即绑定

如何使eclipse工程导入myeclipse

如何使eclipse工程导入myeclipse

慕田峪4524236 2019-03-03 08:04:20
如何使eclipse工程导入myeclipse
查看完整描述

2 回答

?
米脂

TA贡献1836条经验 获得超3个赞


工具:

myeclipse

方法:

1. 在myeclipse中建立一个java web工程。File-->New-->Web Project

2. 开始导入工程中的文件。File-->import

3. 因为eclipse中的web部署文件夹叫做webContent,而myeclipse中叫做webRoot,针对这个不同需要做一系列的修改。首先在新建的工程上点击右键,选择"Properties",出现以下对话框。请注意红框区域,一般都需要修改。

4.将以上webRoot的地方全部改为webContent即可。





查看完整回答
反对 回复 2019-03-11
?
尚方宝剑之说

TA贡献1788条经验 获得超4个赞



具体步骤:
1、通过eclipse的import方式,将web项目导入。
2、打开.project文件,将原配置文件中的<buildSpec>...</buildSpec><natures>...</natures>部分替换为以下内容: <buildSpec>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.Jsdt.core.javaScriptValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.genuitec.eclipse.j2eedt.core.DeploymentDeScriptorValidator</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>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>com.genuitec.eclipse.ast.deploy.core.deploymentnature</nature>
<nature>com.genuitec.eclipse.j2eedt.core.webnature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.Jsdt.core.JsNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures> 3、刷新项目,项目->右键->Properties->Project Facets->Configuration->custom,选择Java和Dynamic Web Module(注意版本,如果无法确定自己的版本,请从高往低测试)

4、修改.settings目录(可在navigator视图下查看)中org.eclipse.wst.common.component文件的如下内容:
<wb-resource deploy-path="/" source-path="/WebContent"/>
改为: <wb-resource deploy-path="/" source-path="/WebRoot"/>
5、刷新项目,然后查看classpath是否有问题。
6、最后,删除eclipse默认的WebContent目录,Myeclipse默认的是WebRoot。





查看完整回答
反对 回复 2019-03-11
  • 2 回答
  • 0 关注
  • 627 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信