试图添加数据库驱动程序(JDBC):RmiJdbc.RJDriver - 错误,不在CLASSPATH中?

时间:2013-03-11 16:02:56

标签: java weka

我正在使用Weka

import weka.core.Instances;
import weka.core.converters.ConverterUtils.DataSource;
.
.
DataSource source;
source = new DataSource("somecsvfile.csv");

我在eclipse中以红色打印在控制台上:

---Registering Weka Editors---
Trying to add database driver (JDBC): RmiJdbc.RJDriver - Error, not in CLASSPATH?
Trying to add database driver (JDBC): jdbc.idbDriver - Error, not in CLASSPATH?
Trying to add database driver (JDBC): org.gjt.mm.mysql.Driver - Error, not in CLASSPATH?
Trying to add database driver (JDBC): com.mckoi.JDBCDriver - Error, not in CLASSPATH?
Trying to add database driver (JDBC): org.hsqldb.jdbcDriver - Error, not in CLASSPATH?

怎么了?

1 个答案:

答案 0 :(得分:10)

没有错。 weka.jar中有一个DatabaseUtils.props文件。这个文件在subversion中有以下行,因此weka尝试加载那些驱动程序。

jdbcDriver=RmiJdbc.RJDriver,jdbc.idbDriver,org.gjt.mm.mysql.Driver,com.mckoi.JDBCDriver,org.hsqldb.jdbcDriver

使用zip实用程序打开jar文件,然后查找weka \ experiment \ DatabaseUtils.props文件。