-
Notifications
You must be signed in to change notification settings - Fork 0
Configure Stick2D Framework
Beatriz Franco Martins Souza edited this page May 7, 2015
·
12 revisions
- Download Eclipse Standard according your Operational System;
- Install Eclipse according this guide;
- Download SWIProlog;
- Install SWIProlog according this guide;
- Download Slick2D;
- Download LWJGL standard bundle;
- Extract the LWJGL zip (lwjgl-x.x.zip) file somewhere in your computer, remember or note down the location, you will need this later. We suggest you create a library (/lib) folder to store all these files in a well-known place.
- Install Eclipse and run it;
- Go to Project --> Properties in the menu bar;
- Click on Java Build Path;
- Click Add Library...
- Select User Library;
- Click Next;
- Click User Libraries;
- In the user libraries dialog select New;
- For SWIProlog do:
- Type in SWIProlog or any other name that you want for the Library Name, click ok;
- Select the new library and:
- click the Add Jar button (if the libraries were extracted to the project space);
- click the Add External Jar button (if the libraries were placed at the SWIProlog folder outside the project space):
C:\Program Files\swipl\lib\jpl.jar
- For Slick2D do:
- Type in Slick2D or any other name that you want for the Library Name, click ok;
- Select the new library and:
- click the Add Jar button (if the libraries were extracted to the project space);
- click the Add External Jar button (if the libraries were extracted to a location outside the project space);
- Go to where you extracted slick.zip and add the following '.jar' files ('Ctrl', or 'Shift' to select multiple entries) from 'lib' folder:
- lwjgl.jar;
- slick.jar;
- jinput.jar;
- lwjgl_util.jar (if want to use OpenGL's GLU class).
- Right-Click your project node and click Build Path > Configure Build Path or;
- Go to Project > Properties and select Build Path, select the Libraries tab;
- Click Add Library;
- Select User Library, click next;
- Add your Slick2D Library, created as instructed above:
- Setup the Native Libraries path:
- From the Properties Dialog on the Library tab expand the Slick2D Library:
- Click the Natives Library Location and click the Edit button;
- Navigate to the location of the LWJGL native folder and select the sub folder for the specific OS;
- Click OK;
- Alternatively before Running the project you have to add the following to the Run Configurations VM Arguments:
- Select Run Configurtion;
- Select the Project;
- Select the Arguments tab;
- From the Properties Dialog on the Library tab expand the Slick2D Library:
- 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 operating system.