Java
The following projects can be used to implement Java applications using the YugabyteDB YSQL API.
| Project (* Recommended) | Type | Support | Examples |
|---|---|---|---|
| YugabyteDB JDBC Driver* | JDBC Driver | Full | Hello World CRUD |
| PostgreSQL JDBC Driver | JDBC Driver | Full | Hello World CRUD |
| Hibernate* | ORM | Full | Hello World CRUD |
| Spring Data YugabyteDB* | Framework | Full | Hello World |
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 project page CRUD example. Before running CRUD examples, 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.