VSCode全栈之路 - java 手动导入 jdbc 驱动包

文章目录

VSCode全栈之路 - java 手动导入 jdbc 驱动包_第1张图片

打开 .classpath 文件, 添加 <classpathentry /> 标签, kind属性为lib依赖, path属性填写驱动位置, 一般web项目都是要放到容器目录的web-ini的lib里, source填驱动的源码, 这样debug可以进源码调试


<classpath>
  <classpathentry kind="src" path="src" />
  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.8.0_65">
    <attributes>
      <attribute name="owner.project.facets" value="java" />
    attributes>
  classpathentry>
  <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v8.5">
    <attributes>
      <attribute name="owner.project.facets" value="jst.web" />
    attributes>
  classpathentry>
  <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container" />
  <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container" />
  <classpathentry kind="output" path="build/classes" />
  <classpathentry kind="lib" path="web/WEB-INF/lib/mysql-connector-java-5.1.48.jar" source="web/WEB-INF/lib/sources/mysql-connector-java-5.1.48.zip" />
classpath>

你可能感兴趣的:(#,VSCode配置全能环境!,#,Java,#,Java,Web)