# Application Development with MariaDB Connector/R2DBC (Native API)

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:

```bash
$ mvn package
```

Run the application:

```bash
$ 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:

```bash
$ export CLASSPATH="/path/to/application:/path/to/r2dbc-mariadb-1.2.0.jar"
```

1. Compile your application:

```bash
$ javac App.java
```

1. Execute the Java class:

```bash
$ java App
```

<sub>*This page is: Copyright © 2025 MariaDB. All rights reserved.*</sub>

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/connectors/mariadb-connector-r2dbc/using-the-native-r2dbc-api-of-mariadb-connector-r2dbc/application-development-with-mariadb-connector-r2dbc-native-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
