eclipse中导入myeclipse项目部署运行

最近因为工作需要需要维护用myeclipse开发的项目,因为自己懒得装myeclipse于是百度找资料,可怜资料大多数不全,前篇一律,好在自己摸索着把问题解决了,于是乎自己整理出来以供后人需要。

     ​ 首先eclipse中导入myeclipse项目后右键close project,然后在工作空间中找到该项目下面的.project文件,添加如下配置:

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

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

在修改.setting文件夹下的

.jsdtscope​和org.eclipse.wst.common.component文件

修改.jsdtscope文件为:

 <?xml version="1.0" encoding="UTF-8"?>

<classpath>

         <!--将WebContent 改成WebRoot-->

         <classpathentry kind="src" path="WebRoot"/>

         <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>

         <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">

                   <attributes>

                            <attribute name="hide" value="true"/>

                   </attributes>

         </classpathentry>

         <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>

         <classpathentry kind="output" path=""/>

</classpath>

修改.org.eclipse.wst.common.component文件为:

<?xml version="1.0" encoding="UTF-8"?>

<project-modules id="moduleCoreId" project-version="1.5.0">

    <wb-module deploy-name="blog">

        <wb-resource deploy-path="/" source-path="/WebRoot"/>

        <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>

        <property name="context-root" value="blog"/>

        <property name="java-output-path" value="/blog/WebRoot/WEB-INF/classes"/>

    </wb-module>

</project-modules>

然后回到eclipse中重新打开项目,右键点击properties-->project Facts在右边选择

java,javascript,Daynamic Web Module三个选项,点击应用保存即可。

到此项目配置修改完成,此时在tomcat下就可以运行该项目了​

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值