Skip to content

Setting Up Your Development Environment

Prerequisites

Before you start setting up your dev environment you will need to have Java development kit installed (JDK). Instructions to do so can be found in the Installing JDK section.

You will also need to have DreamBot on your computer and have it launched at least-once so you can have access to the client files.

Integrated development environment

Since the scripts are written in Java you might want to use an Integrated development environment (IDE) to assist you in the creation of your scripts.
There are multiple IDE's you can choose from. All of them work and are free. They have their own pros and cons which you can personally evaluate. Here are a few worth taking a look at:

Setting up IntelliJ IDEA

For simplicity sake, the IDE chosen to demonstrate this is going to be JetBrains IntelliJ IDEA.
Go to the website above, download and install the latest version of the Community build.

Creating a project

To begin, open up IntelliJ IDEA and you will be presented with a window similar to the following:

IntelliJ starting window

  1. Click on New Project and on the next window and make sure you have Java selected on the left and Java 1.8 for your Project SDK on top. Then click on Next.
    IntelliJ new project

  2. When it asks if you want to use a project from template just click on Next

  3. In the next window give a name to your script and set the location for the project of your choosing. For example "FirstScript" as the name. Then click on Finish

You will now have an empty project.

Configuring the project

Right click on the src folder on the left and select New -> Java Class. You can name it whatever you want. For this example it will be given the name "TestScript"

IntelliJ first class

Adding dependencies

Now you need to add the client as a library to your project. You need this to have access to DreamBot API.

  1. Click on File up on the top left and click on Project Structure...
  2. On the opening window click on Libraries on the left. Then click on the + on the top and select Java
  3. Navigate to the DreamBot BotData folder and select the client.jar file. You can find this folder here:
    • Windows: C:\Users\YOUR_USER\DreamBot\BotData
    • Linux / MacOS: /home/YOUR_USER/DreamBot/BotData
  4. Press Apply and Ok at the bottom right of the window.

Adding an artifact

In order to compile the script and have it appear on DreamBot you need to create a JAR file (an artifact). This can be done rather easily with IntelliJ.

  1. Click on File up on the top left and click on Project Structure...
  2. Select Artifacts on the left. Then click on the + up on top and go to JAR -> From modules with dependencies.... Then on the next windows press OK
  3. Now you will want to change the Output directory on top to the DreamBot Scripts folder. You can find this folder here:
    • Windows: C:\Users\YOUR_USER\DreamBot\Scripts
    • Linux / MacOS: /home/YOUR_USER/DreamBot/Scripts
  4. Then you need to remove client.jar dependency from being included in the artifact, you can do this by right clicking the client.jar in the list and selecting remove. IntelliJ artifact
  5. Press Apply and Ok at the bottom right of the window.

To learn how to set up and run the script go to Running your First Script page.