1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Tutorial Setting up IntelliJ for RuneMate

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

  1. Viewer

    Viewer Discretion is advised

    Joined:
    Jan 2, 2014
    Messages:
    306
    Likes Received:
    77
    1- Create a new project in the folder you want with your JDK specified

    [​IMG]

    2- Move RuneMate.jar to your project folder

    [​IMG]
    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

    [​IMG]

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

    [​IMG]

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

    [​IMG]

    6 - Now lets configure some stuff
    [​IMG]

    • 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

    [​IMG]

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

    [​IMG]

    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.

    [​IMG]

    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

    [​IMG]

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

    [​IMG]

    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

    [​IMG]

    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
    M4XX, Clery, Venumfox and 5 others like this.
  2. Calle

    Joined:
    Nov 23, 2013
    Messages:
    51
    Likes Received:
    11
  3. Sh4dows

    Joined:
    Nov 4, 2014
    Messages:
    79
    Likes Received:
    17
    Thank you.
     
  4. Geashaw

    Joined:
    Jan 8, 2015
    Messages:
    1,429
    Likes Received:
    252
    Great tutorial, got IntelliJ setup, the only part I got lost was where you added online documentation directly from RuneMate JDocs page.
     
  5. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,937
    Likes Received:
    1,266
  6. Geashaw

    Joined:
    Jan 8, 2015
    Messages:
    1,429
    Likes Received:
    252
  7. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,937
    Likes Received:
    1,266
    @Geashaw
     
  8. Hypo

    Joined:
    Dec 10, 2014
    Messages:
    119
    Likes Received:
    14
    Any particular reason I can't seem to see my script bot in the "out/production/RuneMate" Need to test it lol.
     
  9. Geashaw

    Joined:
    Jan 8, 2015
    Messages:
    1,429
    Likes Received:
    252
    I'll help you tonight, which would be around 20.00 GMT+1
     
    Hypo likes this.
  10. Hypo

    Joined:
    Dec 10, 2014
    Messages:
    119
    Likes Received:
    14
    Thanks very much :3
     
  11. skrall

    Joined:
    Jul 24, 2014
    Messages:
    634
    Likes Received:
    161
    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
     
  12. Infinite Inferno

    Infinite Inferno The Pip Collector

    Joined:
    Sep 14, 2014
    Messages:
    445
    Likes Received:
    122
    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.
  13. skrall

    Joined:
    Jul 24, 2014
    Messages:
    634
    Likes Received:
    161
    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
  14. ciresiuol

    Joined:
    Dec 24, 2014
    Messages:
    81
    Likes Received:
    6
    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:
    [​IMG]
    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...
    [​IMG]
     
    #14 ciresiuol, Jan 31, 2015
    Last edited: Feb 6, 2015
  15. ciresiuol

    Joined:
    Dec 24, 2014
    Messages:
    81
    Likes Received:
    6
    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
  16. Dellgenius

    Joined:
    Dec 27, 2014
    Messages:
    287
    Likes Received:
    39
    I clicked ok on jdk 1.8 but still dont see the other options. any ideas?
     
  17. Viewer

    Viewer Discretion is advised

    Joined:
    Jan 2, 2014
    Messages:
    306
    Likes Received:
    77
    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.
  18. Demonic0Sniper

    Joined:
    Feb 25, 2015
    Messages:
    33
    Likes Received:
    9
    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
     
  19. Fontkodo

    Joined:
    Jun 21, 2014
    Messages:
    350
    Likes Received:
    111
    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.
     
  20. Demonic0Sniper

    Joined:
    Feb 25, 2015
    Messages:
    33
    Likes Received:
    9
    [​IMG]
     

Share This Page

Loading...