简体   繁体   English

mysql-connector-java-5.1.38的.jar应该包含在哪个类路径中

[英]In which classpath should .jar of mysql-connector-java-5.1.38 be included

I have no idea as to where to include the .jar file of mysql-connector/j using tomcat8.0.33. 我不知道在哪里使用tomcat8.0.33包含mysql-connector / j的.jar文件。 One of the blogs have mentioned to include in $CATALINA_HOME/common/lib, but i am not able to find "common". 其中一个博客提到要包含在$ CATALINA_HOME / common / lib中,但我找不到“ common”。 And also could anyone please tell me how to create context configuration file for tomcat. 也有人可以告诉我如何为tomcat创建上下文配置文件。

In the $CATALINA_HOME/conf, examine the catalina.properties file. 在$ CATALINA_HOME / conf中,检查catalina.properties文件。 There are definitions for where it will look for .jar files. 对于将在何处查找.jar文件有一些定义。

You can make the directory $CATALINA_HOME/common/lib, but it also must be loaded in one of the loaders defined in that .properties file. 您可以使目录$ CATALINA_HOME / common / lib,但也必须将其加载到该.properties文件中定义的加载器之一中。 We actually make the common/lib, and modify the .properties, but there are differences of opinion on that approach. 我们实际上制作了common / lib,并修改了.properties,但是在该方法上存在意见分歧。

You should also be aware of some differences in the loading because of the class loaders that are used by the different defined loaders. 您还应该注意加载的一些差异,因为不同的已定义加载器使用了类加载器。

I believe you are safe (in terms of it being found) in placing the MySQL library in the $catalina_base/lib directory, which I believe is included by default in the common.loader. 我相信将MySQL库放在$ catalina_base / lib目录中是安全的(就被发现而言),我相信它默认包含在common.loader中。

将其复制到$TOMCAT\\lib夹。但这取决于要在哪里管理连接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将mysql-connector-java-5.1.38-bin粘贴到lib中-Android Studio - pasting mysql-connector-java-5.1.38-bin into lib - Android Studio Mail.jar和mysql-connector-java-5.1.13-bin.jar类路径 - Mail.jar and mysql-connector-java-5.1.13-bin.jar Classpath 如何在 suse 的类路径中添加 mysql 连接器 jar 文件 15 Jenkins Java 11 - How to add mysql connector jar file in classpath in suse 15 Jenkins Java 11 Mac上的CLASSPATH,以及Mac如何寻找mysql-connector-java-bin.jar - CLASSPATH on Mac, and how does Mac look for mysql-connector-java-bin.jar JAR未包含在类路径中 - JAR not being included in classpath mysql连接器到Java jar文件 - mysql connector to java jar file 运行时执行 (JAR) 找不到 Java CLASSPATH 和连接器 J - Runtime execution (JAR) cannot locate Java CLASSPATH and Connector J 我使用哪个MySQL连接器:mysql-connector-java-5.1.46.jar或mysql-connector-java-5.1.46-bin.jar有什么区别? - Which MySQL connector do I use: mysql-connector-java-5.1.46.jar or mysql-connector-java-5.1.46-bin.jar What is the difference? “AWT-EventQueue-0”java.lang.NullPointerException 在 mysql.connector.java@5.1.38-bin/com.mysql.jdbc.ResultSetImpl.getDate(ResultSetImpl.8821324:94518) - "AWT-EventQueue-0" java.lang.NullPointerException at mysql.connector.java@5.1.38-bin/com.mysql.jdbc.ResultSetImpl.getDate(ResultSetImpl.java:2015) MySQL连接器类路径 - MySQL Connector Classpath
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM