Apparently no need for Class.forName(com.mysql.jdbc.Driver);

This commit is contained in:
Marc Baloup 2021-07-25 20:14:30 +02:00
parent 5eaaf8faa5
commit f7e4e42a47
Signed by: marcbal
GPG Key ID: BBC0FE3ABC30B893

View File

@ -19,7 +19,7 @@ public class DBConnection {
public DBConnection(String host, int port, String dbname, String l, String p)
throws ClassNotFoundException, SQLException {
Class.forName("com.mysql.jdbc.Driver");
//Class.forName("com.mysql.jdbc.Driver"); // apparently this is deprecated now
url = "jdbc:mysql://" + host + ":" + port + "/" + dbname
+ "?autoReconnect=true"
+ "&useUnicode=true"