Standard JDBC methods DriverManager.getConnection(String url, String user, String password) are used to connect to the database.īasic url string is standardized for the MariaDB driver: Implementation ':mariadb-java-client:2.1.2' This dependency is used internally, and not exposed to consumers on their own compile classpath. This dependency is exported to consumers, that is to say found on their compile classpath.Īpi ':commons-math3:3.6.1' You can declare any Maven/Ivy/file repository here.
Use jcenter for resolving your dependencies. In this section you declare where to find the dependencies of your project Apply the java-library plugin to add support for Java Library Get MariaDB Java Driverĭeclares driver in adle (and setting java minimal version to 1.8) : This folder contains the file adle that permits configuring Gradle. The new project will be created in current folder. A MariaDB / MySQL server running on localhost using the default port 3306Ĭreate a simple Java project with gradle : gradle init -type java-library.
MariaDB and MySQL databases using the standard JDBC API. MariaDB Connector/J is used to connect applications developed in Java to