The message "java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver" means complier can't find the class org.gjt.mm.mysql.Driver.
org.gjt.mm.mysql.Driver is the official JDBC driver for MySQL (MySQL Connector/J).
Download link:
http://dev.mysql.com/downloads/connector/j/
However, if you are using NetBeans IDE to develop your project (don't need to download the jar from mysql site), you can simply click some button to add that to your project.
Step 1:
Right click your project from project explorer, choose "properties".
Step 2:
Select "Libraries" at left panel and then "Add Library".
Step 3:
Add Library "MySQL JDBC Driver".
Step 4:
Click "OK" and then run your project again.
No comments :
Post a Comment