Slick2D engine is a high performance 2d game library based on a LWJGL(Lightweight Java Game Library). You can see the current features of Slick2D in their site. Download the library from here.
You can check the games made in Slick2D engine and

Tutorials : There are good and easy to go tutorials for beginners.

Now download the library. So here i’ll be telling how to setup the library with netbeans 6.5.1 so that u can write compile and run slick games easily and fast. I am using Ubuntu 8.04(Hardy heron), steps are similar for setting up in windows.

STEP 1: Download the library and save it in some appropriate place.
STEP 2: Open your Netbeans 6.5.1.
STEP 3: Go to tool->libraries. Library Manager window will open. Click New Library. Give it a name Slick. Then click OK.


STEP 4: Now click classpath tab. Click Add Jar/Folder. Browse the folder where u have saved Your slick library. Go to lib folder and add all the jar files except slick.jar. Click OK


STEP 5: Click JavaDoc tab. Click add/zip floder. Browse ur slick folder and select javadoc folder and add it. So done. Click OK.


STEP 6: Ok so your slick library has been created. Now few steps remaining to complete the full set up. Create a new java project called SlickTest. Now Right Click SlickTest project, then click properties. Project properties window will open up. At left side, under categories select Libraries. Now at right side click Compile tab. Now Click Add Jar/Folder. Browse ur slick folder, go to lib folder, select slick.jar and add it.


STEP 7: Now click Run tab. Click Add Library. Add Library window will open up. From there select Slick library that we previously created. Then add it.


FINAL STEP 8 : Now at left side select Run. At Right side, go to VM Options, there u have to provide the parameter/argument that will link lwjgl libraries to your application. So at VM Options textbox, For Ubuntu users write: -Djava.library.path=lwjgl library path For Windows user write: -Djava.library.path=”lwjgl library path”. And Click Ok

Thats it Windows users have to put the path within double quotes. Here lwjgl library path is the path to the location where .so files for ubuntu linux(,,, etc) and .dll for windows(liblwjgl.dll, liblwjgl64.dll, libodejava.dll,libopenal.dll etc) are located.

NOTE: Beware when you copy double quotes from this post

For windows user .dll files comes with slick library but linux users have to download the native .so lib files.

So now you are done and lets write a simple program for testing. This code will just create a window. Create a class called Test under the project that we had created.

package com.padam.testing;

import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.BasicGame;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.SlickException;

* @author padam
public class Test extends BasicGame{

public Test(String name){

public static void main(String[] args){
try {
AppGameContainer container = new AppGameContainer(new Test(“Game”));
} catch (SlickException e) {

public void init(GameContainer gc) throws SlickException {


public void update(GameContainer gc, int delta) throws SlickException {


public void render(GameContainer gc, Graphics g) throws SlickException {



NOTE: Linux and Mac users must download the lwjgl library. Then browse the folder and go to native folder. There choose your native OS folder. That will be your lwjgl library path thatt will go to VM Options parameter as specified on last step or you can copy the .so/native files to your convenient location and provide that path to VM Options parameter.
Now after this just test the above code. You may get a runtime error saying:

Exception in thread “main” java.lang.LinkageError: Version mismatch: jar version is ’16’, native libary version is ’17’
at org.lwjgl.Sys.(
at org.lwjgl.opengl.Display.(
at org.newdawn.slick.AppGameContainer$
at Method)
at org.newdawn.slick.AppGameContainer.(
at com.padam.testing.Test.main(
Java Result: 1
BUILD SUCCESSFUL (total time: 1 second)

Linux/Mac/Solaris might face this problem because lwjgl jar files that comes with slick might be of older version which won’t match with the new lwjgl native .so/native files that u have downloaded. This means that the lwjgl jar files and lwjgl native/ .so files doesn’t match. So what u have to do is browse lwjgl folder that u have downloaded and go to jar folder and copy all the jar files and paste/replace the old jar files in the lib folder located in slick folder or location of slick library.

So Thats it. If u face any problem, comment it.