0% found this document useful (0 votes)
122 views

The Coding Chronicles - Chapter 1 PDF

This document provides instructions for setting up IntelliJ IDEA to develop code for the RuneMate Spectre bot client. It includes downloading and installing Java JDK, IntelliJ IDEA, configuring a new project in IntelliJ pointing to the Java JDK and RuneMate Spectre JAR, and setting a run configuration to launch Spectre in development mode. Following these steps prepares the development environment for writing code that integrates with the RuneMate Spectre API.

Uploaded by

hk
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
122 views

The Coding Chronicles - Chapter 1 PDF

This document provides instructions for setting up IntelliJ IDEA to develop code for the RuneMate Spectre bot client. It includes downloading and installing Java JDK, IntelliJ IDEA, configuring a new project in IntelliJ pointing to the Java JDK and RuneMate Spectre JAR, and setting a run configuration to launch Spectre in development mode. Following these steps prepares the development environment for writing code that integrates with the RuneMate Spectre API.

Uploaded by

hk
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

The Coding Chronicles – for a Newb, by a Newb

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.

Quick Links
Use the following links to quickly jump through the article.

1. Installation
a. Java JDK
b. IntelliJ
2. Configuration
a. Creating Your Project
b. Project Structure
c. Run Configuration
Installation
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


(http://www.oracle.com/technetwork/java/javase/downloads/index.html).

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.
Configuration
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:
com.runemate.boot.Boot
3. Now we’ll need to tell IntelliJ to boot Spectre in Developer Mode using Program arguments.
-sdk

There are 3 Program arguments we can use:

-sdk This boots Spectre in Developer Mode.

-login=user:pass Replacing 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.

Conclusion
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:

https://www.runemate.com/community/members/party.19344/

You might also like