I have java project JavaProject4. In folder lib, I added file postgresql-42.2.2.jre7.jar (postgres driver). Next, I execute the following command:
Class.forName("org.postgresql.Driver").newInstance();
The command terminates with an error:
type: ClassNotFoundException detailMessage: "org.postgresql.Driver"
Question: how do I fix this error?
P.S. I'm a little versed in Java and the development environment of Netbeans.