【发布时间】:2014-05-08 12:00:00
【问题描述】:
我在 Eclipse 中包含了 Java 项目的最新 mysql-connector-java-5.1.30-bin.jar 文件(添加了外部 JAR,也在运行配置 -> 类路径中)。
另外,我在 Linux 上使用 export 命令将它包含在我的系统范围的类路径中。
但是当我运行我的程序时,这些警告和错误不断出现:
Trying to add database driver (JDBC): RmiJdbc.RJDriver - Warning, not in CLASSPATH?
Trying to add database driver (JDBC): jdbc.idbDriver - Warning, not in CLASSPATH?
Trying to add database driver (JDBC): com.mckoi.JDBCDriver - Warning, not in CLASSPATH?
Trying to add database driver (JDBC): org.hsqldb.jdbcDriver - Warning, not in CLASSPATH?
Exception in thread "main" com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
我需要做什么才能让它工作?
【问题讨论】:
-
检查您的网络。好像是连接mysql服务器的问题。
-
请为 linux 发行版找到正确的 mysql 连接器 jar...并添加到 Classpath。
标签: java mysql linux unix classpath