# Getting Started in Java

To get started with Nitrite database, you need to add the Nitrite BOM to your project. The BOM will help you to manage the dependencies. Details of the BOM can be found here.

To add the BOM to your project, follow the steps below:

# Add dependency

Add Nitrite dependency to your project:

# Maven

Add the nitrite dependency to your pom.xml file:

            <version>[latest version]</version>


# Gradle

Add the nitrite dependency to your build.gradle file:

dependencies {
    implementation platform('org.dizitart:nitrite-bom:[latest version]')
    implementation 'org.dizitart:nitrite'

The latest released version of Nitrite can be found here.

# Snapshot builds

Snapshot builds are available from Sonatype.

To use snapshot builds, you need to add the following repository to your pom.xml file:


Or, if you are using Gradle, add the following repository to your build.gradle file:

repositories {
    maven {
        url 'https://oss.sonatype.org/content/repositories/snapshots/'

# Upgrade from 3.x

If you are upgrading from 3.x, please note that there are lots of breaking changes in the API. The whole library is re-written from scratch. It is recommended to go through this guide before upgrading.

Nitrite will try to migrate your existing database to the latest version on the best effort basis without any guarantee provided you are using the MVStore module. If you are using the RocksDB module, you need to migrate your database manually. However, it is recommended to take a backup of your database before upgrading.