Skip to main content
The database provides a native JDBC driver that enables direct connectivity from any JDBC-compatible client, IDE, or application.

Prerequisites

  • Java 8 or later
  • A running cluster

Download

The StarRocks JDBC driver is available on Maven Central. You can download the JAR directly from Maven Central, or add it as a dependency in your project using the instructions below.

Download via Maven CLI

If you have Maven installed, you can download the JAR without creating a project:
The JAR will be saved to your local Maven repository at:

Use the JAR in your project

Maven

Add the following dependency to your pom.xml:

Gradle

Add the following dependency to your build.gradle:

Plain Java

Download the JAR from Maven Central and add it to the classpath when compiling and running:

Connection URL format

Example:

Connection properties

Metadata discovery

The StarRocks JDBC driver supports standard JDBC metadata APIs (DatabaseMetaData), which allow tools to introspect catalogs, schemas, tables, and columns. This enables IDE features such as schema browsing, auto-complete, and table introspection to work out of the box.

Example: connect from Java