Home > Software engineering >  Issue connecting to database using JDBC
Issue connecting to database using JDBC

Time:07-28

I am trying to connect to a postgres database using JDBC in eclipse. However, when running my code I get the error java.lang.ClassNotFoundException: org.postgresql.Driver

I went to Eclipse Java Code

CodePudding user response:

Did you maybe try to clean and build your project again?

CodePudding user response:

I found the solution. I had to create a file in my project and store the JAR there. Then I added the JAR to my build path. Originally, I was storing the JAR in an external location and choosing to build the path with an "External JAR"

  • Related