Get Started with java connector
You are viewing an old version of this article. View
the current version here.
Installation
The recommended way to install MariaDB driver is using a package manager like maven or gradle.
Maven
Add the following dependency to your maven pom.xml file
<dependency> <groupId>org.mariadb.jdbc</groupId> <artifactId>mariadb-java-client</artifactId> <version>xxx</version> </dependency>
Replace "xxx" by a version number. See requirement to select version according to java version
Gradle
Add the following dependency to your maven pom.xml file
implementation 'org.mariadb.jdbc:mariadb-java-client:xxx'
Replace "xxx" by a version number. See requirement to select version according to java version
Using JAR file directly
Even if not recommended, Jar File can always be used directly. The jar file should be saved in an appropriate place for your application and the classpath of your application altered to include MariaDB java connector.
Comments
Comments loading...
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.