ProfessionalCommunity Edition
Setting up your extension development environment manually
-
Last updated: February 13, 2025
-
Read time: 2 Minutes
You can set up your extension development environment to suit your preferences. This page covers the setup requirements and steps.
Note
If you want a faster setup, try our starter project. The project provides a ready-to-use template, so you can skip these steps and start coding immediately. For more information, see Setting up your extension development environment using the starter project.
Prerequisites
Before you begin, download a Java Integrated Development Environment (IDE). An IDE provides features like auto-completion and syntax highlighting to help streamline development.
We recommend using IntelliJ IDEA (Community Edition), a free Java IDE.
Step 1: Create a new project
Set up a new project in your IDE with the following details:
Language: Java.
Build system: Select Maven or Gradle. Using a build system to manage dependencies simplifies project setup.
JDK: Version 21. Burp currently only supports extensions written in Java 21 or lower.
JAR output: Configure your project to produce a JAR file when built.
If you're prompted to choose a Gradle DSL, you can select either Groovy or Kotlin. This only impacts how you configure Gradle - not your Java extension code.
Step 2: Add the Montoya API dependency
Once your project is set up, add the Montoya API to your project's dependencies. Use the latest Montoya API version number, available from the releases page on GitHub.
Gradle configuration
Add the following inside the dependencies
section of your Gradle build file, then sync your Gradle changes:
For Groovy DSL, add the following inside the build.gradle
file: compileOnly "net.portswigger.burp.extensions:montoya-api:LATEST-VERSION"
For Kotlin DSL, add the following inside the build.gradle.kts
file: compileOnly("net.portswigger.burp.extensions:montoya-api:LATEST-VERSION")
Maven configuration
Add the following inside the dependency
block of your pom.xml
file, then update your Maven dependencies:
<dependency>
<groupId>net.portswigger.burp.extensions</groupId>
<artifactId>montoya-api</artifactId>
<version>LATEST-VERSION</version>
</dependency>
Step 3: Create your extension class
Create a Java class that implements the BurpExtension
interface, then define an initialize()
method. For example:
import burp.api.montoya.BurpExtension;
import burp.api.montoya.MontoyaApi;
public class Extension implements BurpExtension
{
@Override
public void initialize(MontoyaApi montoyaApi) {
}
}
The initialize()
method provides an instance of MontoyaApi
, which you can use to interact with and modify Burp Suite.