mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-30 04:19:28 +00:00
fix: add Class.forName(...) back
This commit is contained in:
@@ -79,10 +79,12 @@ public class MySQLData extends SQLData {
|
||||
|
||||
// Connect to database host
|
||||
try {
|
||||
// Class.forName("com.mysql.jdbc.Driver");
|
||||
Class.forName("com.mysql.jdbc.Driver");
|
||||
connection = DriverManager.getConnection("jdbc:mysql://" + host + ":" + port + "/" + database, setupProperties());
|
||||
} catch (SQLException e) {
|
||||
System.out.println(e.getMessage());
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -66,10 +66,12 @@ public class SQLiteData extends SQLData {
|
||||
|
||||
// Connect to database host
|
||||
try {
|
||||
// Class.forName("org.sqlite.JDBC");
|
||||
Class.forName("org.sqlite.JDBC");
|
||||
connection = DriverManager.getConnection("jdbc:sqlite:" + dataFolder);
|
||||
} catch (SQLException e) {
|
||||
System.out.println(e.getMessage());
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user