Skip to main content
This guide walks you through setting up a local development environment to build and run OpenRocket from the source code.

Prerequisites

Install the following before you begin:
OpenRocket is developed using Java 17. Download it from the Oracle JDK 17 archive or use any compatible distribution such as Amazon Corretto or Eclipse Temurin.If you have multiple Java versions installed, verify that Java 17 is active:
java -version
Git is required to clone the repository and manage branches. Download it from git-scm.com.
You need a GitHub account to fork the OpenRocket repository and submit pull requests. Sign up at github.com.
OpenRocket uses Gradle as its build system. A Gradle wrapper (./gradlew) is included in the repository, so a separate system-wide Gradle installation is optional. If you want one, follow the instructions at gradle.org/install.

Obtaining the source code

You cannot push directly to the official OpenRocket repository. Instead, fork it to create a personal copy, make your changes there, and then submit a pull request.
1

Fork the repository

Go to github.com/openrocket/openrocket and click the Fork button in the top-right corner. Leave the default settings and click Create fork. This creates a copy of the repository under your GitHub account at https://github.com/<your_username>/openrocket.
2

Clone your fork

Clone the fork to your local machine. Replace [YOUR USERNAME] with your GitHub username:
3

Initialize submodules

OpenRocket uses Git submodules for the component database. Initialize and fetch them after cloning:
git submodule init
git submodule update

Keeping your fork in sync

The official repository changes frequently. Before starting new work, check whether your fork is behind and sync it if needed. GitHub shows a Sync fork button on your fork’s page; click it and then choose Update branch. After syncing on GitHub, pull the changes into your local clone:
git fetch && git pull
Always keep your fork in sync before opening a pull request. A fork that is many commits behind the main repository is more likely to cause merge conflicts.

IDE setup: IntelliJ IDEA

IntelliJ IDEA is the recommended IDE for OpenRocket development. The Community Edition is free and available at jetbrains.com/idea/download (scroll to IntelliJ IDEA Community Edition).
1

Open the project

Start IntelliJ IDEA. Go to File → New → Project from Existing Sources. In the file dialog, navigate to the directory where you cloned OpenRocket, select the build.gradle file in the root openrocket/ directory, and click Open.
2

Load as a Gradle project

IntelliJ should detect that this is a Gradle project and display a pop-up asking you to Load Gradle Project. Click it.If you dismissed the pop-up, open build.gradle in the editor, right-click anywhere in the file, and choose Link Gradle Project.
3

Configure the JDK

Go to File → Project Structure → Project. Set the Project SDK to JDK 17.If JDK 17 is not listed, click the SDK dropdown and choose Download JDK. Select version 17 and any vendor (OpenJDK, Amazon Corretto, etc.).Then go to Project Structure → Modules and confirm that every module’s SDK is set to JDK 17. If any module shows <No SDK>, click the Module SDK dropdown and select JDK 17.
4

Run OpenRocket

IntelliJ includes three pre-configured run configurations:
ConfigurationPurpose
SwingStartupRuns the full OpenRocket application. Use this for everyday development.
openrocket-jarRuns all unit tests and builds the application as a JAR.
openrocket-testRuns unit tests only.
Select SwingStartup from the run-configuration dropdown and click the green Play button. To debug, click the green Bug icon instead.

Building from the command line

You can also build and run OpenRocket without an IDE using the Gradle wrapper included in the repository. Run OpenRocket:
./gradlew run
Build a distributable JAR:
./gradlew shadowJar
The output is placed in build/libs/OpenRocket-<version>.jar. Run all tests:
./gradlew test
Run Checkstyle:
./gradlew checkstyleMain checkstyleTest

Troubleshooting

Ensure that the JDK path is correctly configured under File → Project Structure → SDKs. If JDK 17 is missing, download it from within the Project Structure dialog.
  • Click the Reload All Gradle Projects button in IntelliJ’s Gradle tool window.
  • Confirm that gradle/wrapper/gradle-wrapper.properties references a Gradle version compatible with Java 17.
This error usually means the project was not imported as a Gradle project. Open build.gradle in IntelliJ, right-click in the file, and choose Link Gradle Project. Then re-run the SwingStartup configuration.