Original link: http://www.blogjava.net/w2gavin/articles/217864.html
Today appears the code appears no suitable driver found for jdbc, is also searched the on-line data, basically said is three questions:
One is: The connection URL format problem (Connection conn=drivermanager.getconnection ("Jdbc:mysql://localhost:3306/xx", "root", "XXXX")
The second is: drive string error (Com.mysql.jdbc.Driver)
The third is that the classpath does not add the proper MYSQL_JDBC drive.
After my careful examination, these three kinds of mistakes I have not committed, why.
Trying to add the Mysql-connector-java-3.1.14-bin.jar jar package to the C:\Program Files\java\jre1.6.0_02\lib\ext folder solves the problem.
It turns out that it's not just about adding drivers to the classpath, but that you need to add that jar package to the outside jar package in the Java runtime, and alas, the next low-level mistake is less of a crime.