Application Development with MariaDB Connector/R2DBC (Native API)

Overview

Methods for building projects with MariaDB Connector/R2DBC vary depending on the installation method you use.

Building with Maven

When building your Java application with Maven, the build downloads and installs the relevant JAR dependencies, and compiles your project:

Build the package:

$ mvn package

Run the application:

$ java -jar target/app.jar

Building with JAR

  1. To build your Java application from a download:
  2. Add your application and the JAR for MariaDB Connector/R2DBC to the Java CLASSPATH:
$ export CLASSPATH="/path/to/application:/path/to/r2dbc-mariadb-1.2.0.jar"
  1. Compile your application:
$ javac App.java
  1. Execute the Java class:
$ java App
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.