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


    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即可

     

  • 相关阅读:
    Hbase与Maven工程的Spring配置笔记
    CentOS7.0+Hadoop2.7.2+Hbase1.2.1搭建教程
    利用Python进行博客图片压缩
    Qt下Armadillo矩阵函数库的添加
    Qt下Eigen矩阵函数库的添加
    OpenCV2.4.13+VS2013配置方法
    OpenCV2.4.13+Qt5.6.2配置方法
    异想家Win10系统安装的软件与配置
    异想家Win7系统安装的软件与配置
    STM32学习笔记:基础例子
  • 原文地址:https://www.cnblogs.com/corvus/p/12808195.html
Copyright © 2020-2023  润新知