[R] RJDBC cant find driver class in JDBC jar file

From: Dan Montgomery <damontgomery_at_gmail.com>
Date: Mon, 02 Jun 2008 17:31:34 -0500

I would like to set up a Windows XP environment with R and MySQL. This set-up was recommended by a friend who uses this set up, but I have been unable to get RJDBC to work. I have installed all of the software today (June 2 2008), first deleting and then replacing old versions of software.

The error is as follows:

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

This error is produced after running the following code ():

drv <- JDBC("com.mysql.jdbc.Driver",


This code was modified from code at www.rforge.net/RJDBC to include version 5.1.6 of the driver. Version 3.1.14 gave the same error. I think that R is having trouble finding the class (driver) in the .jar file even though I can see it using winzip. I have limited knowledge of R and Java, but use other programing languages for work. Thank you for your help.


>From CRAN

-R 2.7.0

Installed in R using the command "install.packages("RJDBC",dep=TRUE)"


>From MySQL.com

-MySQL 5.0.51b (win32)

>From Java.com

-Java 6 update 6

Daniel Montgomery

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Mon 02 Jun 2008 - 23:22:08 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 03 Jun 2008 - 02:30:39 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive