0184デフォルトの名無しさん
2017/06/15(木) 22:27:58.11ID:B79jGaPHhttps://stackoverflow.com/questions/5556664/how-to-fix-no-suitable-driver-found-for-jdbcmysql-localhost-dbname-error-w
Connection con = null;
try {
//registering the jdbc driver here, your string to use
//here depends on what driver you are using.
Class.forName("something.jdbc.driver.YourFubarDriver");
con = DriverManager.getConnection("jdbc:apache:commons:dbcp:test");
} catch (SQLException e) {
throw new RuntimeException(e);
}
ドライバクラスはスタティックイニシャライザでレジストするインプリメンテーションがデフォルト