Back to Yugabyte Db

Java drivers, ORMs, and frameworks

docs/content/stable/develop/drivers-orms/java/_index.md

2026.1.0.0-b255.0 KB
Original Source

Supported projects

The following projects can be used to implement Java applications using the YugabyteDB YSQL and YCQL APIs.

DriverDocumentation and GuidesLatest Driver VersionSupported YugabyteDB Version
YugabyteDB JDBC Driver [Recommended]Documentation
Reference
Blog[{{< version-driver-java >}}](https://mvnrepository.com/artifact/com.yugabyte/jdbc-yugabytedb/{{< version-driver-java >}})
(Supports Java 21)2.8 and above
YugabyteDB R2DBC DriverDocumentation1.1.0-yb-1-ea2.18 and above
PostgreSQL JDBC DriverDocumentation
Reference42.3.42.4 and above
Vert.x Pg ClientDocumentation4.3.2
YugabyteDB YCQL (3.10) DriverDocumentation3.10.3-yb-2
YugabyteDB YCQL (4.15) DriverDocumentation4.15.0-yb-1
ProjectsDocumentation and GuidesExample Apps
Hibernate ORMDocumentation
Hello World
Blog
Hibernate ORM App
Spring Data JPADocumentation
Hello World
BlogSpring Data JPA App
Ebean ORMDocumentation
Hello World
BlogEbean ORM App
MyBatis ORMDocumentation
Hello WorldMyBatis ORM App
Spring Data YugabyteDBDocumentation
BlogSpring Data YugabyteDB Sample App

Learn how to establish a connection to a YugabyteDB database and begin basic CRUD operations by referring to Connect an app or Use an ORM.

Prerequisites

To develop Java driver applications for YugabyteDB, you need the following:

  • Java Development Kit (JDK)

    Install JDK 8 or later. {{% jdk-setup %}}

  • Create a Java project

    You can create Java projects using Maven or Gradle software project management tools. For ease-of-use, use an integrated development environment (IDE) such as IntelliJ IDEA or Eclipse IDE to configure Maven or Gradle to build and run your project.

    If you are not using an IDE, see Building Maven or Creating New Gradle Projects for more information on how to set up a Java project.

    1. Create a project called "DriverDemo".

      sh
      $ mvn archetype:generate \
           -DgroupId=com.yugabyte \
           -DartifactId=DriverDemo \
           -DarchetypeArtifactId=maven-archetype-quickstart \
           -DinteractiveMode=false
      
      $ cd DriverDemo
      
    2. Open the pom.xml file in a text editor and add the following below the <url> element.

      xml
      <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
      </properties>
      

      If you're using Java 11, it should be:

      xml
       <properties>
         <maven.compiler.source>11</maven.compiler.source>
         <maven.compiler.target>11</maven.compiler.target>
       </properties>
      
  • YugabyteDB cluster

    • Create a free cluster on YugabyteDB Aeon. Refer to Use a cloud cluster. Note that YugabyteDB Aeon requires SSL.
    • Alternatively, set up a standalone YugabyteDB cluster by following the steps in Install YugabyteDB.

Next step

Connect an app