Tutorial Setting up IntelliJ for RuneMate

Discussion in 'Tutorials & Resources' started by Viewer, Apr 4, 2014.

  1. 1- Create a new project in the folder you want with your JDK specified


    2- Move RuneMate.jar to your project folder

    3- When you open your project in IntelliJ, you'll see RuneMate.jar in your project tree, right click on it and select "Add as library", and click "Ok" in the next window that will appear


    4 - Now that you have RuneMate added to your library, go to Run-> Edit configurations


    5- In the window that appeared, click on "+" icon and select "Application"


    6 - Now lets configure some stuff

    • In main class put "com.runemate.Boot"
    • In program arguments put "-sdk" , this will allow developer toolkit on your bot, so you can get data to your scripts bots
    • Check "Use alternative JRE" and browse to your java folder (I use a 32-bit version but there's no problem if your version is 64-bit, it will probably be"C:\Program Files\Java\jre7")
    Now click "Apply" and then "OK" button.

    7- Now you'll be able to run RuneMate from IntelliJ by clicking on the green play button on your toolbar


    Extra tip: Go to File > Project structure (or press Ctrl + Alt+ Shift+ S), in the window that appeared, click on "Specify Documentation URL" button


    In the window that appeared, put Generated Documentation (Untitled) URL in the text box and click "OK" button, this will add documentation directly from RuneMate JDocs page to your IDE.


    Now click "Apply" and "OK" button again.

    How to use it?
    When you want to check the documentation of a class, hold Ctrl button and hover the class name in your code, hover the box that will appear and then click on pin icon


    A window will appear with further information about that class provided by RuneMate JDocs


    How to make bot find the scripts bots compiled by IntelliJ?

    In RuneMate, click on play button, click on bots tab and then click on "Change directory" button


    Browse to your project folder, then go to out/production/RuneMate <-- RuneMate will be the folder you need to select, not your first package folder, then click on "Select folder" button and your scripts bots will appear.

    That's it... I hope you guys enjoyed, if you have any question feel free to ask!
    #1 Viewer, Apr 4, 2014
    Last edited: Nov 21, 2015
    Clery, Venumfox, Sh4dows and 4 others like this.
  2. Thank you.
  3. Great tutorial, got IntelliJ setup, the only part I got lost was where you added online documentation directly from RuneMate JDocs page.
  4. @Geashaw
  5. Any particular reason I can't seem to see my script bot in the "out/production/RuneMate" Need to test it lol.
  6. I'll help you tonight, which would be around 20.00 GMT+1
    Hypo likes this.
  7. Thanks very much :3
  8. With a fresh install of IntelliJ, I only see a 'project SDK' option at upper right corner, none of the other options that are present on your first picture @Viewer
  9. You need to first download JDK 1.8, and then when it asks you to specify a project SDK, browse to the location of the JDK 1.8 folder (C:/programs/java/jdk1.8), click on the folder and press open, and then you can go on to follow this tutorial.
    skrall likes this.
  10. Thanks, the layout is kinda different now since IntelliJ has a different interface :)

    Edit: I downloaded this Groovy stuff to start scripting with it, just because it's the same stuff Viewer uses in his pictures and there's also a script bot skeleton based on it.
    #13 skrall, Jan 30, 2015
    Last edited: Jan 30, 2015
  11. Pretty sure I did everything right (kinda hard to tell with how much IntelliJ has changed), but I don't have the option to change the directory of my scripts bots when I run Runemate... Any ideas?

    EDIT (02/06/15||12:32pm EST):

    I got everything set up and working... For anyone having issues following this guide, download from this link: https://confluence.jetbrains.com/display/IntelliJIDEA/Previous+IntelliJ+IDEA+Releases

    Get the 13.1.6 for whatever OS you're using...
    To get the theme he's using (which helps a lot), when u open intelliJ, go to "Settings" -> "Appearance" -> "Themes" and select the "Darcula" theme...
    Then just follow the guide... Everything's the same except for adding the Javadocs...
    To add the Javadocs, press "ctrl+alt+shift+s", select "Libraries" in the left pane, then in the right side of the window, click the little + icon with a globe on it, as shown here:
    After u click that, a small window will pop up...
    Paste the JavaDocs link in and click ok, then follow the rest of the guide and you're good to go...
    #14 ciresiuol, Jan 31, 2015
    Last edited: Feb 6, 2015
  12. Just a bump!!! So people know how...

    Putting the images in spoilers... They're huge...lol
    #15 ciresiuol, Feb 6, 2015
    Last edited: Feb 6, 2015
  13. I clicked ok on jdk 1.8 but still dont see the other options. any ideas?
  14. Ok so I made a video trying to explain in the best way possible about how to set up intelliJ for runemate, I hope you guys understand it, check the main post
    Arbiter likes this.
  15. Set this up exactly how the guide is and i get this error.

    Exception in thread "main" java.lang.UnsupportedClassVersionError: com/runemate/Boot : Unsupported major.minor version 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:116)

    Process finished with exit code 1
  16. Looks like you need to use SDK 8 to run it, there should be some guides on how to switch to Java 8 on IntelliJ, on Google.
  17. [​IMG]

Share This Page