java的Timer定時器中獲取數據庫鏈接報錯

在java的Timer定時器中獲取數據庫鏈接時報,java.sql.SQLException: No suitable driver found for jdbc:mysql:\\,有時獲取不到鏈接; 可是在其餘地方(不在定時器中)相同的方法能夠正常獲取鏈接; 解決辦法:使用DriverManager.getConnection(url, user, pwd),不能用DriverManager.g
相關文章
相關標籤/搜索