- Joined
- Sep 22, 2014
- Messages
- 618
- Thread Author
- #1
Tutorial 1: Setting up IntelliJ for RuneMate on Windows
This is the first tutorial in a series, if you'd like to see more, take a look at this thread:
https://www.runemate.com/community/...bots-for-runemate-from-novice-to-expert.2322/
This is the first tutorial in a series, if you'd like to see more, take a look at this thread:
https://www.runemate.com/community/...bots-for-runemate-from-novice-to-expert.2322/
This is a comprehensive tutorial which takes you through the steps of downloading, installing, and setting up IntelliJ for RuneMate, assuming a clean install of Windows 8.1 x64:
Text-based instructions::- Either click here or search 'download jdk' on Google (and select the first result) in order to download JDK. On the download page, select this button:
- On the next page, select 'Accept License Agreement', and download the appropriate binary for your system (make sure to download the 64-bit binary if you're using a 64-bit operating system).
- Next, once the installer has finished downloading, launch it and complete the installation. You do not need to configure the installer in any way whatsoever.
- Now, either click here or search 'download intellij' on Google (and select the first result) in order to download IntelliJ. On the download page, select the Community Edition:
- Next, make sure you've got a copy of the RuneMate.jar file - click here to get the latest version or go to the "Download" page on the website.
- When the IntelliJ download is finished, you can go ahead and install it - no special configuration is needed here. Next, run IntelliJ.
- This screen may show up. Unless you have a previous installation, just click "OK".
- Next, the 'Customize Idea' screen will show up. Select any options you want, or alternatively, click 'Skip All and Set Defaults':
- On the next window, select "Create New Project":
- Next, you'll be confronted with the window below. You'll need to pick the project SDK.
- On this window, you'll need to:
- Click the "New" button.
- On the popup list which appears, click "Java"
- Select the path of your JDK installation. This ought to be in the format %Program Files%\Java\jdkx.x.x_xx.
- Click "OK".
- Then, click "Next", and keep doing so until you reach the "Project name" textbox. I called my project Runemate, but you can call it whatever you want:
- Take note of the Project location. Next, take the RuneMate.jar file which you downloaded earlier, and Copy & Paste it into the Project location directory.
- Next, you should see an image like the one below. Press Alt+1 in order to open up the sidebar, as shown below:
- Next, click the button circled in red in the image above in order to open the "Project Structure" dialogue, as shown:
- Once the dialogue is visible:
- Select "Modules"
- Ensure that the "Java x.x" module is present
- Click the green "+" button
- Select "JAR"
- Next, a dialogue should appear prompting you to select a file. Select RuneMate.jar, as which you should have just pasted into your project's base directory, as shown:
- Once this is done, click "OK" on both dialogues to close them.
- Next, on the main IntelliJ window, select Run -> Edit Configurations...
- On the dialogue which appears, click the "+" button, and select "Application", as shown:
- Fill out the information on the debug configuration likeso (but replace my username with yours):
- For convenience, the contents of each of the fields is:
-
Code:
com.runemate.Boot
-
Code:
-sdk -login=FORUMUSERNAME:FORUMPASSWORD:GAMETYPE
- Note that only -sdk is necessary in this field. GAMETYPE can be OSRS or RS3. The rest is for convenience
- You might also do well to give the configuration a name, as the name is specified as "Untitled" in the screenshot
- When this is done, click "OK".
-
- Now you're ready to start creating some packages. If it's not open, press ALT+1 in order to open the project sidebar.
- Now right click the "src" folder, and create a new package. You can call the package something along the lines of "com.yourname.bots".
- Inside this package, create a new class called "testbot". When finished, your package structure should look like this (not that I've disabled flattening of packages in this screenshot, so yours might look slightly different.
- Open the testbot class, and add the following code:
- If you'd like a cursory explanation of what this code actually does, please refer to the video tutorial at 7:30.
- Next, right click your "testbot" package on the project sidebar, and create a new file called "testbot.manifest.xml". After you're done, your project structure ought to look something like this:
- Open the testbot.manifest.xml and add the following XML:
- Again, if you'd like an explanation of what this does, please refer to the video tutorial.
- You're now ready to debug for the first time. Press the green play button on the top right of the IDE:
- RuneMate ought to show up. Once it's loaded, press the "Start Bot" button. If no bots show up, then click the "Change Directory" button (this is expected but may not always be the case). An open file dialogue ought to appear.
- Make sure that once it appears, you select the directory above the "com" directory in the "out" directory of your project. It ought to look something like this:
- If you did everything correctly, a bot ought to show up in the list called "Test bot". Once it appears, then select it and click the start button.
- If a message appears in the debug window like the one below, then you've got your first bot set up with RuneMate! Congratulations!
If you'd like to see more tutorials by me, see the tutorial index, here: https://www.runemate.com/community/...bots-for-runemate-from-novice-to-expert.2322/
Last edited: