Thursday, 16 May 2013

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver error


When I try connect my java program to mysql database using eclipse,i am getting the run time error
 "java.lang.ClassNotFoundException: com.mysql.jdbc.Driver"


The reason for the error is you don't have mysql-connector.jar in your Classpath. This jar
contains "com.mysql.jdbc.Driver" class and it must be present in java classpath in order to successful connection to mysql database.
you can downlad mysql-connector.jar from

Click here for adding mysql connector jar to eclipseclass path

No comments:

Post a Comment