0

I am trying to connect a Java application to an Azure database stored in the cloud. I keep receiving the ClassNotFoundException when running

Class.forName("org.mariadb.jdbc");

I am experienced with Java, but new to connecting a Java application to a database. I have downloaded and included

"mariadb-java-client-2.5.2-sources.jar"

in my project. Are there any other jar files I should be including? If not what else do I need to do to prevent this error from occurring? If it helps I am using Eclipse.

Thank You

M. Rogers
  • 367
  • 4
  • 18

1 Answers1

0

Use Maven dependency

<!-- https://mvnrepository.com/artifact/org.mariadb.jdbc/mariadb-java-client -->
<dependency>
    <groupId>org.mariadb.jdbc</groupId>
    <artifactId>mariadb-java-client</artifactId>
    <version>2.5.2</version>
</dependency>
Nick
  • 805
  • 5
  • 14