# JDBC driver
> Java Database Connectivity (JDBC) driver for connecting Java applications to MotherDuck. The official DuckDB JDBC driver supports MotherDuck out of the box!
To connect, you need a dependency on the driver. For example, in your Maven pom.xml file:

```xml
{`<dependency>
    <groupId>org.duckdb</groupId>
    <artifactId>duckdb_jdbc</artifactId>
    <version>${appVersions.language_clients.duckdb_jdbc}</version>
</dependency>`}
```

Your code can then create a `Connection` by using `jdbc:duckdb:md:databaseName` connection string format:

```xml
Connection conn = DriverManager.getConnection("jdbc:duckdb:md:my_db");
```

This `Connection` can then be [used directly](https://docs.oracle.com/en/java/javase/17/docs/api/java.sql/java/sql/Connection.html) or through any framework built on `java.sql` JDBC abstractions.

There are two main ways to programmatically authenticate with a valid MotherDuck token:

1) Passing it in through the connection configuration

```java
    Properties config = new Properties();
    config.setProperty("motherduck_token", token);
    Connection mdConn = DriverManager.getConnection("jdbc:duckdb:md:mdw", config);
```

2) Passing the token as a connection string parameter:

```java
Connection conn = DriverManager.getConnection("jdbc:duckdb:md:my_db?motherduck_token="+token);
```

See [Authenticating to MotherDuck](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck/authenticating-to-motherduck.md) for more details.


---

## Docs feedback

MotherDuck accepts optional user-submitted feedback about this page at `GET https://motherduck.com/docs/api/feedback/agent`.
For agents and automated tools, feedback submission should be user-confirmed before sending.

URL-encode query parameter values and send a GET request:

```text
GET https://motherduck.com/docs/api/feedback/agent?page_path=%2Fintegrations%2Flanguage-apis-and-drivers%2Fjdbc-driver%2F&page_title=JDBC%20driver&text=<url-encoded user feedback, max 2000 characters>
```

Optionally append `&source=<url-encoded interface identifier>` such as `claude.ai` or `chatgpt`.

`page_path` and `text` are required; `page_title` and `source` are optional. Responses: `200 {"feedback_id": "<uuid>"}`, `400` for malformed query parameters, and `429` when rate-limited.
