Setting up Slick2D with NetBeansIDE
From Slick2D Wiki
Revision as of 05:43, 3 July 2013 by Slicker (Talk | contribs) (Added Setting up Slick2d with Netbeans)
Contents
Introduction
This tutorial will run you through the steps you'll need to set Slick2d with the NetBeans.
Since Slick2d uses LWJGL, setup is split into 2 parts, the Jar files, and the LWJGL natives (*.dll files for Windows, *.so files for linux and *.dylib/*.jnilib for Mac).
Downloading and Extracting Slick2d and LWJGL
- Extract the LWJGL zip (lwjgl-x.x.zip) file somewhere in your computer, remember or noted it down, you will need this later. We suggest you create a library (/lib) folder to store all these files in a well-known place.
Setting Up Slick2d and LWJGL in NetBeans
Extracted from LWJGL with Netbeans
- Open up NetBeans.
- Go to Tools|Libraries in the main menu.
- Click on the New Library button.
- Type in Slick2d or any other name that you want for the Library Name.
- Select Classpath tab for your newly created Library and then click the Add JAR/Folder... button.
- Go to where you extracted lwjgl-X.X.zip and add the following '.jar'('Ctrl' or 'Alt' to select multiple files)
- lwjgl.jar
- Slick.jar
- jinput.jar
- lwjgl_util.jar (if want to use OpenGL's GLU class)
Setting Up a Project to Use LWJGL in NetBeans
- In a new Java project:
- Right-Click your project node or go to File>Project Properties and select Libraries
- Add your Slick2d Library , created as instructed above
- Select Run
- On VM Options put the following:
-Djava.library.path=<lwjgl-X.X path>/native/<linux|macosx|solaris|windows>
(*)Note: Remember to select the natives of your Operation System.