No suitable driver found for jdbc mysql?
I had the same problem. I solved it by adding:
Class.forName("com.mysql.jdbc.Driver");
For all but the most trivial applications the CLASSPATH
environment variable is NOT used. Normally the libraries are include in the Class-Path
entry in the manifest of the jar, or in the -cp
option of the java commandline.
In this case you need to add the MySQL JDBC driver to the buildpath of your Eclipse project.