---
title: "关于Eclipse内导入MyEclipse文件的方法"
author: "mixturemay"
date: "2010-06-01T14:57:13Z"
tags: []
categories: ["编程语言"]
slug: "eclipse-myeclipse"
draft: false
lastmod: "2010-06-01T15:01:29Z"
id: 680925
url: "https://mixturemay.iteye.com/blog/680925"
---

在直接Import
MyEclipse的项目文件导入到Eclipse之后，需要在项目所放的workspace内修改引入项目目录下的.project文件，修改如下：
1.增加一个<buildCommand>，代码如下：

```java
	<buildCommand> 
			<name>org.eclipse.wst.validation.validationbuilder</name> 
			<arguments> 
			</arguments> 
 </buildCommand>
```

2.修改<natures>，修改后代码如下：

```java
	<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>
		<nature>org.eclipse.jdt.core.javanature</nature>
		<nature>org.eclipse.wst.jsdt.core.jsNature</nature>	
	</natures>
```

之后，刷新项目工程文件。继而，右键项目——>Properties——>选择Project Facets,勾选Dynamic Web Module以及Java，在Runtime内勾选Tomcat。
然后进入项目目录，在其.settings的目录下修改org.eclipse.wst.common.component内<wb-resource deploy-path="/" source-path="/<span style="color:red">WebRoot</span>"/>
然后再刷新项目工程文件，删除WebContent，即可在Tomcat中发布并运行。