The official MongoDB Java Driver providing both synchronous and asynchronous interaction with MongoDB. Powering the drivers is a new driver core and BSON library.
- BSON Library
- A standalone BSON library, with a new Codec infrastructure that you can use to build high-performance encoders and decoders without requiring an intermediate Map instance.
- MongoDB Driver
- An updated Java driver that includes the legacy API as well as a new generic MongoCollection interface that complies with a new cross-driver CRUD specification.
- MongoDB Async Driver
- A new asynchronous API that can leverage either Netty or Java 7's AsynchronousSocketChannel for fast and non-blocking IO.
- Core driver
- The MongoDB Driver and Async Driver are both built on top of a new core library, which anyone can use to build alternative or experimental high-level APIs.
The recommended way to get started using one of the drivers in your project is with a dependency management system. Select the driver, version and dependency management system below and the snippet can be copied and pasted into your build.
Alternatively, head over to our documentation to learn more about getting started with Java and MongoDB.
<dependencies> <dependency> <groupId>org.mongodb</groupId> <artifactId>mongodb-driver-sync</artifactId> <version>3.8.2</version> </dependency> </dependencies>
For older versions of the driver please use the
|3.8.2||Reference | API|
|3.7.1||Reference | API|
|3.6.4||Reference | API|
|3.5.0||Reference | API|
|3.4.3||Reference | API|
|3.3.0||Reference | API|
|3.2.2||Reference | API|
|3.1.1||Reference | API|
|3.0.4||Reference | API|
|2.14.2||Reference | API|
|2.13.3||Reference | API|
M101J: MongoDB for Java Developers
Learn everything you need to know to get started building a MongoDB-based app. From basic installation, JSON, schema design, querying, insertion of data, indexing and working with the Java driver.