K.P. K.P. - 1 year ago 71
MySQL Question

Struggling with - Class not found exception: com.mysql.jdbc.Driver in JAVA

In Netbeans ide 7.0, I am facing this particular problem. I wrote the following line of code in my program


This particular line is throwing an exception. And when I connected the same mysql db server from the "Services -> Databases -> Drivers -> MySQL(Connector/Jdriver)" in the netbeans 7.0, it got connected. When I went into the properties of that connection I found that it is connecting the mysql server using the same class which I used in the line of code.

I also read some of the forums such as


but this 1 is for netbeans on Ubuntu. What about Windows?

also, went through all of the responses in here


I don't know what is wrong? Please help.

Answer Source

You need to download the connector from here: http://www.mysql.com/products/connector/ and include it in your classpath

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download