<< Chapter < Page | Chapter >> Page > |
Go to Oracle and download the latest release of Java SE (standard edition) that is compatible with your system. Then open the installation instructions and select the link for your system. For example, there is (or was) a link on that page that reads:
JDK Installation for Microsoft Windows - Describes how to install the JDK on 32-bit and 64-bit Microsoft Windows operating systems.
Follow the link to the installation instructions for your system and follow those instructions to install the Java Development Kit. When doing theinstallation, pay attention to the link that reads Updating the PATH Environment Variable (Optional) . This is where many of my students encounter installation difficulties.
(Note that over time, some of these links may change. However, the general concepts involved should continue to be relevant.)
There are also issues dealing with something called the classpath , but I will explain how to deal with those issues later.
I am assuming that you can install the text editor and the JDK with no help from me. Therefore, I will concentrate on installing and configuring the Slick2Dsoftware. (Note that these instructions apply to the 64-bit versions. Instructions for installing the 32-bit version were similar.)
The Code folder tree
Begin by creating a folder somewhere on your disk named Code (or some other similar name of your choosing) .
Create three sub-folders under the Code folder having the following names:
(See Download source code to download folders named jars , lwjglbin , and Slick0100a already populated with the minimum required 64-bit Windows-compatible software.)
Extract the contents of the zip file
Using whatever program you can find to open a zip file (I use a program named WinZip) , extract and save the following files from the lib folder in the 64-bitSlick2D distribution that you downloaded earlier .
There are many other files in the Slick2D distribution file, but we don't need them just yet. If we need them in a future module, I will tell you.
These three files are needed to satisfy the classpath and java.library.path requirements that I will describe later.
The first two jar files
Copy the first two jar files from the above list into your new folder named jars .
As you will see later, this results in the need to execute the following command in order to set the classpath whenever you compile or execute aSlick2D program:
-cp .;../jars/slick.jar;../jars/lwjgl.jar
The third jar file
The third file in the above list applies to Windows only. If you are using a different system, you should find asimilar file in the Slick2D distribution that applies to your system. (For example, the distribution contains files named natives-linux.jar andnatives-mac.jar.)
Extract contents of the jar file
Using whatever program you can find to open a jar file (I use a program named WinZip) , extract the following files from the file named natives-windows.jar :
Notification Switch
Would you like to follow the 'Anatomy of a game engine' conversation and receive update notifications?