带有makeCluster的rJava'找不到类'错误 [英] rJava 'class not found' error with makeCluster

查看:92
本文介绍了带有makeCluster的rJava'找不到类'错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到这个问题已有一段时间了,无法在线找到答案.我尝试执行makeCluster并以某种方式获取此

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

.jfindClass(as.character(driverClass)[1])中的错误:未找到类

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.

推荐答案

在控制台中,首先将File-> changedir放入jar文件位置

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

然后您尝试这个

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

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

这篇关于带有makeCluster的rJava'找不到类'错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆