找不到JDBC驱动程序
try {
String userName = "root";
String password = "";
//<facility> is my database
String url = "jdbc:mysql://localhost/facility";
Class.forName ("com.mysql.jdbc.Driver").newInstance ();
conn = DriverManager.getConnection (url, userName, password);
System.out.println ("Database connection established");
}
catch (Exception e)
{
System.out.println ("Cannot connect to database server " +e.getClass().getName());
}
回答:
看来您应该将MySQL驱动程序jar放入 。
以上是 找不到JDBC驱动程序 的全部内容, 来源链接: utcz.com/qa/415429.html