• Installation Guide

Installation

The recommended way to get started using one of the drivers in your project is with a dependency management system.

MongoDB Java Driver

This jar that contains everything you need including the BSON library.


<dependencies>
    <dependency>
        <groupId>org.mongodb</groupId>
        <artifactId>mongo-java-driver</artifactId>
        <version>2.14.2</version>
    </dependency>
</dependencies>

You can also download the jars directly from sonatype.

BSON

This library comprehensively supports BSON, the data storage and network transfer format that MongoDB uses for “documents”. BSON is short for Binary JSON, is a binary-encoded serialization of JSON-like documents.


<dependencies>
    <dependency>
        <groupId>org.mongodb</groupId>
        <artifactId>bson</artifactId>
        <version>2.14.2</version>
    </dependency>
</dependencies>

You can also download the jars directly from sonatype.