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 Eclipse Kepler for RuneMate

First Bot Author
Joined
Aug 7, 2013
Messages
262
Installing Eclipse Kepler
Download "Eclipse IDE for Java Developers" and extract the archive to wherever you want. (image)

Installing the SVN plugin
Open Eclipse and edit your preferences, such as line numbering, save actions, automated formatting, etcetera.
Next, go to the Subversive website and drag the installation icon into Eclipse. The following screen will pop up: image, accept and continue everything and Eclipse will restart.

Creating a Java Project for RuneMate
Open the File menu and select New -> Java Project. Give the project a fitting name and change the location of the project if you want to change it. Finish without changing any other settings. (image)

You will now see your newly generated project in the Project Explorer. Download RuneMate and re-name the file to RuneMate.jar, then drag this jar onto the title of your project and select to copy the file (instead of linking to it).
Also create a file called Launch.bat, with the following content:
Code:
java -jar RuneMate.jar -sdk
pause

Do the same for this file and you will now have two more files in your project's directory. (image)

Now there's two more things to do to get RuneMate running with Eclipse; first you will need to add RuneMate as a library. Right-click your project and select Properties. Go to the Java Build Path submenu and then select the Libraries tab. Click "Add JARs..." (not external jars!) and select RuneMate.jar, then press OK to save your changes.

Next open the Run menu and from the External Tools submenu, select External Tools Configurations (image). Create a new Program and call it RuneMate. The location should be your batch file (use the Browse Workspace button) and your working directory should be your project (use the Browse Workspace button). Apply changes and run. (image)

Having RuneMate run as external application will allow RuneMate to continue running after closing Eclipse, which would be a useful trait.

Linking the Javadocs to your project
Go back to the Libraries tab and expand RuneMate.jar. The Javadoc location has not yet been set, so we're going to do that now. (image) Click Edit and enter RuneMate's Javadoc url. Save your changes. (image)

Linking your project using Subversive
The final step to make the uploading of scripts as easy as possible. Right-click your project and select Team -> Share Project (not Share Projects), select SVN as versioning system and install the latest SVN kit (at my time of writing, 1.8.3). Eclipse will restart and you will have to click Share Project again, this time you will be asked to fill in a few details, which you can find here.

Enter your project url and fill in your credentials. It is perfectly safe to save your credentials. (image, image)
Click next and make sure to enter Simple Mode, then make sure the URL is the exact URL indicated by RuneMate! (image)

Finalizing Subversive
You do not want all files to be synchronized with RuneMate's repository, so you will be wanting to set Subversive to exclude certain files and/or directories. To get started go to the Window menu and from the Show View submenu, show the Navigator. (image)

You want to ignore all folders and files except source folders. Most of the times, "src" will be your only source folder. However, as my project is linked to a different project, I also have a source folder called "SJBijzitter". For all files you wish to ignore, right-click and select Team -> Add to svn:ignore. If the option to ignore a specific file is greyed out, it means Eclipse will be handling that file for you and you should not worry about it.

Go back to the Package Explorer and right-click your project. Select Team -> Commit and everything should work out. If an error is shown saying your project is outdated, select Team -> Update and then commit.

Updating RuneMate
If RuneMate updates, of course you'll need to let Eclipse know about it! Simply download the new RuneMate client and rename it to RuneMate.jar, then drag it onto your project and Eclipse will ask you if you want to overwrite the current file called RuneMate.jar, select yes and you're all done!
 
Last edited:
Engineer
Joined
Jul 28, 2013
Messages
2,776
Wasn't aware that this is now required, I initially wrote this guide for Beta 3.
Thread updated!
Well it's still not required in Beta 5, however with the release of either beta 6 or RC1 it will be, so I figured it'd be good to update the guide before it's actually necessary :)
 
Author of MaxiBots
Joined
Dec 3, 2013
Messages
6,775
Thanks for this, helped a bit with my setup. You might like to add that if a folder or file that you don't want on the svn has been pushed by accident, you have to delete it before you can ignore it. Once deleted a red cross appears next to the item. Then, commit the update and it should say that the files were deleted :)
 
Joined
Nov 6, 2013
Messages
16
Dec 08, 2014 12:33:58 AM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
[Debug] Started with java 1.8.0_25
Error: Invalid or corrupt jarfile C:\Users\John\AppData\Local\Temp\1294088821.jar


unable to open runemate via cmd or eclipse
 
Joined
Nov 5, 2014
Messages
505
Dec 08, 2014 12:33:58 AM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
[Debug] Started with java 1.8.0_25
Error: Invalid or corrupt jarfile C:\Users\John\AppData\Local\Temp\1294088821.jar


unable to open runemate via cmd or eclipse

Download RuneMate.jar to your project directory
 
Joined
Dec 15, 2014
Messages
5
I get this error when I apply changes and run,

C:\Users\Vuk\workspace\RuneMate>java -jar RuneMate.jar -sdk
Dec 16, 2014 7:55:07 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
(07:55:08) [Debug] Started RuneMate V1.0.0 Beta 66 with java 1.8.0_25

It still opens the client though. What did I do wrong?
 
Mod Automation
Joined
Jul 26, 2013
Messages
3,046
That's a harmless warning. I get the same thing. @Cloud told me how to fix it ages ago, but I never bothered.

tl;dr don't worry about it slash wait for @Cloud to post here.
 
Joined
Mar 14, 2015
Messages
24
Would it be possible to package the runemate into your jar so that if you export it as a runnable file and open it it will automatically open runemate in development mode and with your bot loaded?
 
Mod Automation
Joined
Jul 26, 2013
Messages
3,046
Would it be possible to package the runemate into your jar so that if you export it as a runnable file and open it it will automatically open runemate in development mode and with your bot loaded?
The short answer is no, and we would never want it to be done as such for numerous reasons, including auto-updates, branding, malicious intent, etc. The only supported distribution is the Bot Store. If you are trying to automate the process I recommend looking into program arguments.
 
Top