众所周知,myeclipse自带了很多实用的插件,正因为这些插件的强大功能,帮助web程序猿提高了开发效率,同时也看到了无限明媚的春天!而eclipse给大家的印象则是,绿色软件,体积小,速度快,界面清爽,这些都是它显著的优点,当然,它也有缺点,那就是功能相对myeclipse而言比较少。虽然eclipse也可通过扩展插件来增加很多与myeclipse相同的功能,但很多人习惯了拿来主义,自己去折腾这样或那样的插件总觉得麻烦,还不如直接安装myeclipse,一会功夫,全部搞定,接着便可以大展拳脚,开始自己的宏图大业。不过,我要说的是,那是曾经的eclipse,现在eclipse推出了很多开发版本,无论你是c++,还是java,eclipse都提供了相应的开发版本。比如做java的web开发,eclipse有对应的j2ee版本。当然,萝卜青菜各有所爱,每个人都有它喜欢的IDE,并且每个IDE都有它的优点和缺点。就比如我,我喜欢不耗内存的,界面漂亮的工具,所以eclipse肯定是我的最爱,尤其爱eclipse中代码的字体和颜色搭配得很好,看起来很舒服。当然,还有个客观的原因,那就是开发语言是java,正是因为这个原因,所以当遇到myeclipse的web项目,如果我需要把这个项目直接导入到我的eclipse工作目录中,就需要进行一些配置上的修改,如果不修改,项目将无法直接运行。以下是具体步骤:
1、通过eclipse的import方式,将web项目导入。
2、打开.project文件,将原配置文件中的<buildSpec>...</buildSpec><natures>...</natures>部分替换为以下内容:
Java代码
<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文件的如下内容:
Java代码
<wb-resource deploy-path="/" source-path="/WebContent"/>
改为:
Java代码
<wb-resource deploy-path="/" source-path="/WebRoot"/>
5、刷新项目,然后查看classpath是否有问题。
6、最后,删除eclipse默认的WebContent目录,Myeclipse默认的是WebRoot。
注:转自http://wangshi-ws.iteye.com/blog/1564351
分享到:
相关推荐
将java项目从myeclipse导入eclipse
从myeclipse导入eclipse导致不能识别为web项目(java项目转为web项目)
MyEclipse/Eclipse自定义模板XM MyEclipse/Eclipse自定义模板XM 直接导入就可以使用了 安装方法: 打开eclipse/myeclipse 选择 window-->Preferences-->JAVA-->Code Style-->Code Templates 右边点Import 选择你写好...
myeclipse在Java Project(java项目)中导入jar环境步骤(图解). 就是不到如jar包,在java工程中运行!很详细的 值得下载!
项目介绍 管理员角色包含以下功能 管理员登录,管理员管理,合作公司管理,车型信息,货物基本信息,汽车详细情况,客户留言,订单管理等功能。...2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为
项目介绍: 入住管理、退房管理、房型管理、房间管理、订单管理、评价管理 ...2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行
用MYECLIPSE ORCAL MVC 整个项目
酒店管理系统-温情小筑后台管理系统 系统概要 项目主要功能包括: ...3. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;若为maven项目,导入成功后请执行maven clean;
2. 使用IDEA/Eclipse/MyEclipse导入项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中application.yml配置文件中的数据库配置改为自己的配置; 4. 运行项目,在浏览器中
项目介绍 本项目为后台管理系统, ...2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3.
打开eclipse/myeclipse 选择 window-->Preferences-->JAVA-->Code-->Code Templates 右边点Import 选择下载的本资源解压后的的.xml文件 导入进去即可 使用方法: 创建新类的时候,勾上“Generate comments”选项...
项目介绍 本项目为后台管理系统,包括管理员与学生两种角色; 学生包含以下功能: 学生提交报修,添加维修,催单,水电缴费,登录页面等功能。...2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为
2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中jdbc.properties配置文件中...
项目介绍 项目主要包括管理员与用户两种角色; 管理员角色包含以下功能:管理员登录,主页面,分类查看,修改个人信息,上传小说,查看小说,删除小说,评论顶收藏小说等...2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/M