
Java
The following projects can be used to implement Java applications using the YugabyteDB YSQL API.
Supported Projects
Project | Documentation and Guides | Latest Driver Version | Supported YugabyteDB Version |
---|---|---|---|
PostgreSQL JDBC Driver | Documentation Hello World App Reference Page |
42.3.4 | 2.4 and above |
YugabyteDB Smart Driver [Recommended] | Documentation Hello World App Blog Reference Page |
42.3.4 | 2.8 and above |
Project | Documentation and Guides | Example Apps |
---|---|---|
Hibernate | Documentation Hello World App Blog |
Hibernate ORM App |
Spring Data YugabyteDB | Documentation Hello World App Blog |
Spring Data YugabyteDB Sample App |
Spring Data JPA | Documentation Hello World App Blog |
Spring Data JPA App |
Learn how to establish a connection to a YugabyteDB database and begin basic CRUD operations using the Hello World examples.
For fully-runnable code snippets and explanations of common operations, see the example apps. Before running the example apps, make sure you have installed the prerequisites.
For reference documentation, including using projects with SSL, refer to the drivers and ORMs reference pages.
Prerequisites
To develop Java applications for YugabyteDB, you need the following:
-
Java Development Kit (JDK)
Install JDK 8 or later. For more information on how to check your version of Java and install the JDK, see the AdoptOpenJDK Installation Page. -
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. -
YugabyteDB cluster
- Create a free cluster on YugabyteDB Managed. Refer to Create a free cluster. Note that YugabyteDB Managed requires SSL.
- Alternatively, set up a standalone YugabyteDB cluster by following the steps in Install YugabyteDB.
Next steps
- Learn how to build Java applications using Hibernate ORM.
- Learn how to develop Spring Boot applications using the Spring Data YugabyteDB project.