5

We are working on a project in netbeans using Java which uses mysql database to process some common queries. But I am having issues with loading jdbc drivers for mysql in netbeans. It is giving following error:

Class Not Found Exception : com.jdbc.mysql.Driver please help me out.

Babanna Duggani
  • 737
  • 2
  • 12
  • 34

3 Answers3

6

You just have to add the MySQL JDBC connector to your project. It would be similar for an Oracle database, for example (you would have to add the ojdbc6.jar).

For MySQL, you have to get the MySQL JDBC connector and add it to your project's classpath.

Michael Mior
  • 28,107
  • 9
  • 89
  • 113
SRG
  • 1,569
  • 1
  • 17
  • 19
2

When your suffering from this kind of problem then you need to check MySQL version is updated or corrected . If your are working on normal program then add MySQL jar version 5.1.32 or if you used maven structure then you used this dependency

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.32</version>
</dependency>

I hope that it will work on your problem.....

Darshan
  • 2,094
  • 1
  • 15
  • 15
0

if we add any jar files related data base drivers to class path are not visible in the IDE. so once again we must add jar file to IDE in library folder,then only the classes in jar file can identified,in the IDE.

Venkat
  • 347
  • 3
  • 13