9
0
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:
Craftinators
2023-02-27 13:06:23 -05:00
parent ef4d53eb85
commit 475a1e0ef1
2 changed files with 6 additions and 2 deletions

View File

@@ -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);
}
}

View File

@@ -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);
}
}