The Coding Chronicles - Chapter 1 PDF
The Coding Chronicles - Chapter 1 PDF
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).
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.
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.
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”.
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
-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/