Tutorial Setting up IntelliJ for RuneMate on Windows - Tutorial 1

Discussion in 'Tutorials & Resources' started by Eagles13, Jul 25, 2015.

  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:

    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:
      1. Click the "New" button.
      2. On the popup list which appears, click "Java"
      3. Select the path of your JDK installation. This ought to be in the format %Program Files%\Java\jdkx.x.x_xx.
      4. 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:
      1. Select "Modules"
      2. Ensure that the "Java x.x" module is present
      3. Click the green "+" button
      4. 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 (Text):
        1. com.runemate.Boot
      • Code (Text):
      • 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/
    #1 Eagles13, Jul 25, 2015
    Last edited: Jul 25, 2015
    Sweden likes this.
  2. Nice! How is it going on this whole tutorial project? :)
  3. Pretty well. I'm currently uploading & processing no.2
  4. Can't wait :)
  5. How can I use proxy with this? Cuz now it skips the settings for proxy.
  6. I'm unsure of whether RM accepts proxy configuration as a commandline argument, so for now you can probably just remove the username & password configuration, or you could ask @Cloud if this feature is planned/implemented.
  7. It says "Unrecognized option: -sdk" for me when I run it.

    Wrote it in the wrong field. My bad.
    #7 GabeN, Sep 29, 2015
    Last edited: Sep 29, 2015
  8. Your should join our development chat so one of us can Teamviewer and set you up. :)
  9. I followed all the steps its not giving me any errors its opening Runemate when I compile but my test bot isn't showing up even going into development mode I change the directory and its not showing my scripts bots
  10. realy helpfull also on mac os, thank :)
  11. I'm having the same issue as whitlock is there any chance we can get some help with this?
  12. What about DarkScape in the part where I need to input my forum credentials and the game type? DS? or what?
  13. I have a space in my name, so how exactly would that work? It won't log in automatically even if I enter a space.
  14. Its DARK
    Not DS
  15. Does this work for spectre?
  16. Doesn't seem so, Unless I'm doing something wrong.
  17. This setup worked fine for me with spectre.
  18. com.runemate.boot.Boot (if you're still having an issue)
    Sh4dows likes this.
  19. Was an issue with IntelliJ and Spectre. I have to launch spectre manually in -sdk mode. Launching it from the IDE causes 32bit/64bit issues even with proper run configurations.
  20. The debug picture is invalid, can you update it?

Share This Page