码迷,mamicode.com
首页 > 编程语言 > 详细

Web项目lib下的jar包无法自动加载

时间:2020-04-30 13:19:19      阅读:273      评论:0      收藏:0      [点我收藏+]

标签:eclips   deb   无法   javase   ace   自动   webroot   try   pat   

Web项目复制到lib下的jar包不自动加载

打开项目的Java source目录,发现没有web app libraries目录

 

解决:

打开项目源码,打开.classpath文件,内容如下

<classpath>

            <classpathentrykind="src" path="src"/>

            <classpathentrykind="con"path="melibrary.com.genuitec.eclipse.j2eedt.core.MYECLIPSE_JAVAEE_5_CONTAINER"/>

<classpathentry kind="con"path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">

                       <attributes>

                                   <attributename="owner.project.facets" value="java"/>

                       </attributes>

            </classpathentry>

            <classpathentrykind="output" path="WebRoot/WEB-INF/classes"/>

</classpath>

对比可以自动加载的项目的.classpath文件

<classpath>

            <classpathentrykind="src" path="src"/>

            <classpathentrykind="con" path="com.genuitec.eclipse.j2eedt.core.J2EE14_CONTAINER"/>

            <classpathentrykind="con" path="org.eclipse.jdt.USER_LIBRARY/MyJars"/>

            <classpathentrykind="con"path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">

                        <attributes>

                                   <attributename="owner.project.facets" value="java"/>

                       </attributes>

             </classpathentry>

<classpathentrykind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>

<classpathentrykind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>

          <classpathentrykind="output" path="WebRoot/WEB-INF/classes"/>

</classpath>

 

添加这一句:<classpathentry kind="con"path="org.eclipse.jst.j2ee.internal.web.container"/>   重启eclipse即可

 

Web项目lib下的jar包无法自动加载

标签:eclips   deb   无法   javase   ace   自动   webroot   try   pat   

原文地址:https://www.cnblogs.com/corvus/p/12808195.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!