eclipse的工程类型切换

onverting a Java project to a Dynamic Web project in Eclipse (基于WTP,通过Project Facets)

What's WTP?
http://www.eclipse.org/projects/project_summary.php?projectid=webtools

引用
The Eclipse Web Tools Platform (WTP) project extends the Eclipse platform with tools for developing Web and Java EE applications. It includes source and graphical editors for a variety of languages, wizards and built-in applications to simplify development, and tools and APIs to support deploying, running, and testing apps.



Converting a Java project to a Dynamic Web project in Eclipse:
http://greatwebguy.com/programming/eclipse/converting-a-java-project-to-a-dynamic-web-project-in-eclipse/

Eclipse – Project Facets:
http://www.beilers.com/2009/05/eclipse-project-facets/


将MyEclipse项目导入到Eclipse中:
http://todaydiy.blog.163.com/blog/static/104189687201021035312604/

引用

1.请首先确保你的eclipse是javaee版本的,或者已经安装看wtp插件
2.然后修改eclipse工程下的.project文件:
Xml代码   收藏代码
  1. <!--在 <natures></natures>中加入-->  
  2.     <nature>org.eclipse.wst.common.project.facet.core.nature</nature>  
  3.     <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>  
  4.     <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>  
  5.   
  6. <!--在 <buildSpec></buildSpec>中加入-->  
  7.      <buildCommand>  
  8.         <name>org.eclipse.wst.common.project.facet.core.builder</name>  
  9.         <arguments>  
  10.         </arguments>  
  11.     </buildCommand>  
  12.     <buildCommand>  
  13.         <name>org.eclipse.wst.validation.validationbuilder</name>  
  14.         <arguments>  
  15.         </arguments>  
  16.     </buildCommand>  

3.刷新项目,项目->右击->Properties->Project Facets->Modify Project,选择Java和Dynamic Web Module
          配置Context Root 和Content Directory 以及源码路径。






A Error:

引用
Java compiler level does not match the version of the installed Java project facet


解决:
http://www.eclipsezone.com/eclipse/forums/t80428.html

引用

A wtp project is composed of multiple units of functionality (known as facets).
Take a look at Project Properties -> Project Facets panel. The java facet version needs to always match the java compiler compliance level.
The best way to change java level is to use the Project Facets properties panel as that will update both places at the same time
Alternatively, when you get the error that you are referring to, there are quick fixes available to resolve it.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值