so I have a project that requires Weka machine learning library (weka.jar) and the mysql jdbc mysql-connector-java-5.1.17-bin.jar
I have them both as part of my build path in the project....I also added them both to my CLASSPATH environment variable...so the project runs perfectly when I use Eclipse's run button...
but then after exporting the project as a standalone jar and run the java -jar theproject.jar command,
it returns a whole bunch of errors:
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): com.mckoi.JDBCDriver - Error, not in CLASS
Trying to add database driver (JDBC): org.hsqldb.jdbcDriver - Error, not in CLAS
java.sql.SQLException: No suitable driver found for jdbc:idb=experiments.prp
java.lang.IllegalStateException: Not connected, please connect first!
even though it ran perfectly on eclipse and despite the fact that both weka.jar and mysql-connector-java-5.1.17-bin.jar are in the CLASSPATH environment variable...
what did I do wrong? Did you export the jar as runnable JAR from Eclipse?
以上就是jdbc not in classpath error的详细内容，更多请关注web前端其它相关文章！