title: Struggling with - Class not found exception: com.mysql.jdbc.Driver in JAVA
body: <p>In Netbeans ide 7.0, I am facing this particular problem. I wrote the following line of code in my program</p>
  
  <p>Class.forName("com.mysql.jdbc.Driver").newInstance();</p>
  
  <p>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.</p>
  
  <p>I also read some of the forums such as </p>
  
  <p><a href="http://www.javakb.com/Uwe/Forum.aspx/java-setup/11895/ClassNotFoundException-com-mysql-jdbc-Driver-from-netbeans" rel="nofollow">http://www.javakb.com/Uwe/Forum.aspx/java-setup/11895/ClassNotFoundException-com-mysql-jdbc-Driver-from-netbeans</a></p>
  
  <p>but this 1 is for netbeans on Ubuntu. What about Windows?</p>
  
  <p>also, went through all of the responses in here</p>
  
  <p><a href="http://forums.mysql.com/read.php?60,42473,42473#msg-42473" rel="nofollow">http://forums.mysql.com/read.php?60,42473,42473#msg-42473</a></p>
  
  <p>I don't know what is wrong? Please help.</p>