jdbc not in classpath error

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 PATH? Trying to add database driver (JDBC): org.hsqldb.jdbcDriver - Error, not in CLAS SPATH? 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前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏