Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Tutorial Setting up IntelliJ for RuneMate

Discretion is advised
Joined
Jan 2, 2014
Messages
306
1- Create a new project in the folder you want with your JDK specified

7WjSV.png


2- Move RuneMate.jar to your project folder

7Wk1x.png

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

7WkdY.png


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

7Wkjd.png


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

7WkkW.png


6 - Now lets configure some stuff
7Wktb.png


  • 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
  • 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

7WkJY.png


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

7Wl52.png


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.

7Wl88.png


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

7Wlhf.png


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

7WlnL.png


How to make bot find the scripts compiled by IntelliJ?

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

7WlSG.png


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 will appear.


That's it... I hope you guys enjoyed, if you have any question feel free to ask!
 
Last edited:
Joined
Jan 8, 2015
Messages
1,427
Great tutorial, got IntelliJ setup, the only part I got lost was where you added online documentation directly from RuneMate JDocs page.
 
Mod Automation
Joined
Jul 26, 2013
Messages
3,012
Extra tip: Go to File > Project structure (or press Ctrl + Alt+ Shift+ S), in the window that appeared, click on "Specify Documentation URL" button

7Wl52.png


In the window that appeared, put https://www.runemate.com/developer/jdocs URL in the text box and click "OK" button, this will add documentation directly from RuneMate JDocs page to your IDE.

7Wl88.png


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

7Wlhf.png


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

7WlnL.png

@Geashaw
 
Joined
Dec 10, 2014
Messages
119
Any particular reason I can't seem to see my script in the "out/production/RuneMate" Need to test it lol.
 
Joined
Jul 24, 2014
Messages
633
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
 
The Pip Collector
Joined
Sep 14, 2014
Messages
445
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
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.
 
Joined
Jul 24, 2014
Messages
633
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.
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 skeleton based on it.
 
Last edited:
Joined
Dec 24, 2014
Messages
81
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 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:
344cqxs.jpg
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...
91jqwy.jpg
 
Last edited:
Joined
Dec 24, 2014
Messages
81
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 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:
344cqxs.jpg

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...

91jqwy.jpg
Just a bump!!! So people know how...

Putting the images in spoilers... They're huge...lol
 
Last edited:
Joined
Dec 27, 2014
Messages
287
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.
I clicked ok on jdk 1.8 but still dont see the other options. any ideas?
 
Discretion is advised
Joined
Jan 2, 2014
Messages
306
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
 
Joined
Feb 25, 2015
Messages
33
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
 
Joined
Jun 21, 2014
Messages
350
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
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.
 
Top