Skip to main content
JDA is available on Maven Central. The latest version is always shown in the GitHub Release.

Requirements

The minimum Java version supported by JDA is Java SE 8. JDA also uses JSR 305 to support solid interoperability with Kotlin out of the box.
To use JDA for audio connections, you must also add a dependency that implements the DAVE Protocol. See Making a Music Bot for details.

Installation Methods

Add JDA to your build.gradle or build.gradle.kts file:
repositories {
    mavenCentral()
}

dependencies {
    implementation("net.dv8tion:JDA:$version") { // replace $version with the latest version
      // Optionally disable audio natives to reduce jar size by excluding `opus-java` and `tink`
      // Gradle DSL:
      // exclude module: 'opus-java' // required for encoding audio into opus
      // exclude module: 'tink' // required for encrypting and decrypting audio
    }
}
Replace $version with the latest version number from Maven Central.

Audio Dependencies

By default, JDA includes dependencies for audio support:
  • opus-java - Required for encoding audio into opus format
  • tink - Required for encrypting and decrypting audio
If you’re not building a music bot, you can exclude these dependencies to reduce your JAR size as shown in the examples above.

Verify Installation

After adding JDA to your project, verify the installation by creating a simple test file:
Test.java
import net.dv8tion.jda.api.JDABuilder;

public class Test {
    public static void main(String[] args) {
        System.out.println("JDA imported successfully!");
    }
}
If your IDE can resolve the import and the code compiles without errors, JDA has been successfully added to your project.

Next Steps

Quick Start Guide

Build your first Discord bot with JDA

Build docs developers (and LLMs) love