so I am writing a programm that accesses a database but whenever i can the method Class.forName("org.postgresql.Driver); the ClassNotFoundException is thrown.
I have looked at every solution to this problem I could find, but nothing worked.
I hope you can help me with this.
Code:
public static void editDatabase(String[] values){
Connection connect = null;
Statement statement = null;
ResultSet result = null;
try {
Class.forName("org.postgresql.Driver");
connect = DriverManager.getConnection(values[0],values[1],values[2]);
statement = connect.createStatement();
result = statement.executeQuery("select * from Kunde");
} catch (SQLException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}