Get Started with the Java Driver
Overview
The Java driver is a synchronous API that you can use to interact with MongoDB from your Java application. This guide shows you how to create an application that uses the Java driver to connect to a MongoDB cluster hosted on MongoDB Atlas and query data in your cluster.
Tip
MongoDB Atlas is a fully managed cloud database service that hosts your MongoDB deployments. You can create your own free (no credit card required) MongoDB Atlas deployment by following the steps in this guide.
Follow this tutorial to connect a sample Java application to a MongoDB Atlas deployment. The tutorial includes the following sections:
Download and Install: Learn how to install the Java driver.
Create a MongoDB Deployment: Learn how to create a free MongoDB deployment on Atlas.
Create a Connection String: Learn how to retrieve your Atlas deployment's connection string.
Connect to MongoDB: Learn how to create an application that connects to MongoDB and queries data stored in your deployment.
If you prefer to connect to MongoDB using a different driver or programming language, see our list of official drivers.