Tutorial The Coding Chronicles - Chapter One: Ready, Set, Go!

Discussion in 'Tutorials & Resources' started by Party, May 11, 2016.

  1. The Coding Chronicles – for a Newb, by a Newb

    An easier to read, PDF version of this document can be found at the bottom of the post.

    Chapter One: Ready, Set, Go!

    Setting up IntelliJ for use with RuneMate Spectre

    IntelliJ is what is known as an IDE (Integrated Development Environment). It is a piece of software which has the sole purpose of making the lives of coders a lot easier. Other alternatives are of course available, however this guide will be using IntelliJ, largely down to how powerful and accessible I have found it to be.

    a. Java JDK
    Everything you will be doing from now on will require Java. As a developer, we will need the Java Development Kit (which we’ll be calling the JDK from now on). I am running on a 64-bit operating system, so I’ll be using the 64-bit JDK. Bear in mind that RuneMate Spectre requires, and comes packaged with, a 32-bit version of the Java Runtime Environment (now JRE).

    You can get this from Oracle’s website (Java SE - Downloads | Oracle Technology Network | Oracle).


    Select Java Platform (JDK), and on the following page download the Java JDK version appropriate for your operating system. In my case, this is Windows x64.


    Once this has installed, we can move on to setting up IntelliJ.

    b. IntelliJ
    You will need to download IntelliJ from developer’s website(www.jetbrains.com/idea/download/). The free (community) version is more than adequate for our purposes.


    When you run the installed, be sure to specify that you do not have a previous version installed.


    Next, select your theme. I personally use the ‘Darcula’ theme, so it me be easier for you to follow along with the rest of the article if you do too.


    The next few steps after theme selection are incredibly easy to work through and I will not need to guide you.

    a. Creating Your Project
    On the following screen, select “Create New Project”.


    You will be shown the following window, where you will need to be sure you have “Java” selected in the menu on the left hand side.

    Then you’ll need to specify which JDK you’ll be using for this project. Select “New” along the top, and then “JDK”.


    Navigate to the directory where you installed your JDK earlier, like below:


    Select “Next” on the screens following, until you reach the following screen. Enter your desired project name and location.


    Select “Finish”, and you’re ready to go! I recommend flattening your packages in the project view.


    Configuring IntelliJ for use with RuneMate Spectre
    So we have our projected created correctly, now it’s time to configure it to allow us to start coding for Spectre.

    Note the reference image below:


    Object 1 will bring you to the Project Structure menu.

    Object 2 will bring you the Run Configurations menu.

    b. Project Structure
    This menu will allow us to import the RuneMate Spectre client and grant us access to its’ API. Open it by selecting Button 1, as shown above.


    Select Modules (1) and your Project (2). Ensure the “Module SDK” (3) is the same as we set earlier, and if it is not, navigate to your JDK installation directory and select it.

    Finally, we’ll import RuneMate Spectre. Select the “+” button and select “JARs or directories…” (4)

    Navigate to your RuneMate installation directory, and select RuneMate.jar, and select “OK”.


    The final result should look this this:


    The rest can be left at their default values.

    c. Run Configuration
    The Run Configuration defines how we are going to be executing our code. In this instance, it’s going to be executed within RuneMate Spectre. The standard Spectre client does not allow for the execution of local (custom) bots, and so we will need to configure it to run in Development Mode (SDK mode). Access this menu as shown above.

    You’ll be shown the following menu, where you’ll need to select the “+” button, followed by “Application”.


    After we have done this, we’ll need to enter some information regarding how we’ll be running Spectre. Note the following reference image:


    1. First of all, we’ll need to give our configuration a name. I simply use “Spectre”.

    2. Now we’ll need to tell IntelliJ how to boot Spectre by defining the Boot class:


    3. Now we’ll need to tell IntelliJ to boot Spectre in Developer Mode using Program arguments.


    There are 3 Program arguments we can use:

    -sdk This boots Spectre in Developer Mode.

    -login=user:passReplacing user & pass with your forum username and password respectively will attempt to log you in with those details automagically, meaning you don’t have to enter your details every time you load the client

    -Xmx1300M This Program argument allows you to allocate a maximum heap space allocation for Spectre. As Spectre only uses a 32-bit JRE, the maximum we can assign here is about 1.3GB (1300M).

    If you installed and selected a 64-bit JDK earlier, you will now need to change the defaulted one to a 32-bit JRE, as this is the only JRE that Spectre will accept.


    We haven’t done much, but we’re well on our way. We’ll have very little IntelliJ configuration to do after this, so we can start getting down to the juicy stuff: coding.

    If you have any questions about anything you’ve seen thus far, please feel free to send me a message on the RuneMate forum:


    This thread is a branch of the index found at: Tutorial - The Coding Chronicles - for a Newb, by a Newb | Community | RuneMate

    Contained is the file: The Coding Chronicles - Chapter One: Ready, Set, Go!

    Attached Files:

    #1 Party, May 11, 2016
    Last edited: May 24, 2016
    blahberrys and pianaman like this.
  2. awesome! been trying to learn how to code for the past few days. looking forward to more of your tutorials :)
  3. How do you add your own bots to the runemate client in sdk mode? all I have atm is development toolkit? and I can't add my own bots.
  4. We'll cover that in the next post.

    Sent from my iPhone using Tapatalk
  5. This is very informative, thank you a ton.
    Will read both parts 1 and 2 and can't wait for more!
  6. Just so you know, I've added the next chapter which covers the topic you're looking for.
  7. Put -sdk as one of your arguments, then click the cog on spectre and change the directory to where you saved your projects via eclipse/intelliJ.
  8. Uh i dont have a runemate.jar..
  9. C:/program files x86 / runemate, it should be in there
  10. Haha thanks Intellij brought me to the wrong directory..
  11. Got it nevermind sorry

    Attached Files:

    #11 snoipa, May 26, 2016
    Last edited: May 26, 2016
  12. i dont hack people, how the fck do i know where u leave ur files :cool::rolleyes:
  13. It says you're looking for a home directory for your JDK. Make sure you select the green '+'; it should say "Attach files or directories."
  14. I cant find a 32-bit JRE download on java.. anyone got a link please?
  15. Java SE Runtime Environment 8 - Downloads
    --- Double Post Merged, Jul 20, 2016, Original Post Date: Jul 20, 2016 ---
    Windows x86 = 32bit
  16. sorry new to this. they are all x64 or x86?? im running on windows 10
  17. x86 = 32bit
    x64 = 64bit

    You can see which version you're running my opening your Start menu (Windows key) and right clicking Computer > Properties.


    I'm on Win7 but it should look similar to the following:

    Alternatively you can open Spectre and go to Help > About.
    BirdShapedTurd likes this.
  18. You should like my post cus i was nice.
    BirdShapedTurd likes this.
  19. For OSX users, 32 bit JRE is bundled with RuneMate and can be found at:



    And RuneMate.jar can be found at:

  20. Can you make this a little easy to understand? Maybe remove the cancer emoji lol. Then put an example.

    Because i have tried

    -login=user pass

    Edit: now i have clocked on to the cancer being ":"P

    EDIT2: how do you write in the username if it has a space in it?

    Edit3: Trial and error leads me to using quotation marks if you have a username with a space.
    --- Double Post Merged, Oct 18, 2016, Original Post Date: Oct 18, 2016 ---
    Also, i cannot get this part the same as your screenshots. I have no idea what i have done! lol

    Attached Files:

Share This Page