我收到一个错误..
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:545)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at pack.ConnectionFactory.getConnect(ConnectionFactory.java:37)
String DriverClass = "com.mysql.jdbc.Driver";
static String url = "jdbc:mysql://localhost:3306/dbqwe";
使用 J2SE1.5、TOMCAT 6.0.36、MYSQL 5.5 SERVER 和 ECLIPSE JUNO。
tried with mysql-connector-java-5.1.18-bin
mysql-connector-java-5.1.22.jar
mysql-connector-java-5.1.2.jar
mysql-connector-java-3.1.7-bin.jar
ojdbc14.jar
把它们放在
web-inf/lib, tomcat lib
和
eclipse/jre/lib
还将jar文件添加到java构建路径中......
知道我哪里出错了吗?