-->

rJava 'class not found' error with makeClu

2019-09-14 14:49发布

问题:

I'm having this issue for a while now and can't find answers online. I try to execute makeCluster and somehow get this

Error in .jfindClass(as.character(driverClass)[1]) : class not found

library(doParallel)
library(foreach)
cores = makeCluster(2)
# Loading required package: methods
# Loading required package: DBI
# Loading required package: rJava
# Error in .jfindClass(as.character(driverClass)[1]) : class not found
# Calls: JDBC -> is.jnull -> .jfindClass
# Execution halted

Would anyone be able to help? Thanks.

回答1:

In your console first File-->changedir into your jar file location

then you try this one

drv <- JDBC(driverClass="com.mysql.jdbc.Driver", classPath="mysql-connector-java-5.1.23-bin.jar", identifier.quote="`")