My project can connect to the database in the services tab. But when I go to connect to my database through the code, it does not work.
I tried adding Class.forName("org.apache.derby.jdbc.ClientDriver") but it underlines it and can't find it.
I tried adding the Derby client jar to the project, still nothing.
The error:
java.sql.SQLException: No suitable driver found for jdbc:derby://localhost:1527/MYDB
This is a Java Maven project.
I seem to have fixed the issue. So when I tried to add through the library manager setting, it did not work (Finding the derby client and updating).
But when I used the dependencies folder it worked. Can anyone explain please?