• Create Account

## error trying to setup slick2d with eclipse

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

6 replies to this topic

### #1Darego  Members

156
Like
0Likes
Like

Posted 10 January 2013 - 10:50 AM

hi there, i was following a tutorial on how to set up slick2d and lwjgl with eclipse and after finishing it and starting on a project i keep getting this message in the console:

at org.lwjgl.Sys$1.run(Sys.java:75) at java.security.AccessController.doPrivileged(Native Method) at org.lwjgl.Sys.doLoadLibrary(Sys.java:68) at org.lwjgl.Sys.loadLibrary(Sys.java:84) at org.lwjgl.Sys.<clinit>(Sys.java:101) at org.lwjgl.opengl.Display.<clinit>(Display.java:128) at org.newdawn.slick.AppGameContainer$1.run(AppGameContainer.java:39)
at java.security.AccessController.doPrivileged(Native Method)
at org.newdawn.slick.AppGameContainer.<clinit>(AppGameContainer.java:36)
at simpleGame.SimpleGame.main(SimpleGame.java:39)

any idea what i did wrong trying to set up slick?

cheers

### #2Glass_Knife  Moderators

8600
Like
2Likes
Like

Posted 10 January 2013 - 11:35 AM

That is the error you will get when lwjgl tries to load the system *.dll files (if you're on windows).

You can add the folder with the dll files to your windows PATH environment variable, or somewhere in the startup script, set the java.library.path variable:

-Djava.library.path=C:/lwjgl/native

I am not familiar with this issue in Slick, but I've had the same issue plenty of times. When using Tomcat to load native libraries, I've also had to reboot the computer after setting the path.

If that doesn't work, post some more info. There is no way you're the only person having this problem

Ciao,

Edited by Glass_Knife, 10 January 2013 - 11:35 AM.

I think, therefore I am. I think? - "George Carlin"
My Website: Indie Game Programming

My Book: http://amzn.com/1305076532

### #3Darego  Members

156
Like
0Likes
Like

Posted 10 January 2013 - 01:15 PM

cheers for the reply mate, i followed the slick2d tutorial on how to set it up and it looked like it worked until i got a different message:

at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary1(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Unknown Source) at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at org.lwjgl.Sys$1.run(Sys.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.lwjgl.Sys.<clinit>(Sys.java:101)
at org.lwjgl.opengl.Display.<clinit>(Display.java:128)
at org.newdawn.slick.AppGameContainer\$1.run(AppGameContainer.java:39)
at java.security.AccessController.doPrivileged(Native Method)
at org.newdawn.slick.AppGameContainer.<clinit>(AppGameContainer.java:36)
at games.SlickBasicGame.main(SlickBasicGame.java:82)

anyone know what the problem is now?

Edited by Darego, 10 January 2013 - 02:06 PM.

### #4Angex  Members

884
Like
2Likes
Like

Posted 10 January 2013 - 02:24 PM

Are you using 64bit version of Eclipse & Java VM?

It looks like Slick2D is trying to load 32bit native dll's.

LWJGL does provide 64bit builds; but you will probably need to modify your Slick2D build to load them.

### #5P0jahn  Members

305
Like
1Likes
Like

Posted 10 January 2013 - 05:20 PM

There is a excellent mini series on youtube explaining how to set it up with eclipse and how to use it.

Part 1 of the series:

### #6Darego  Members

156
Like
0Likes
Like

Posted 11 January 2013 - 04:55 AM

thanks for the replies. i used your tutorial P0jahn and got it all working. i now have a new error when trying to run a program

Exception in thread "main" java.lang.ClassCastException: java.lang.NullPointerException cannot be cast to java.io.IOException
at org.newdawn.slick.opengl.CompositeIOException.getMessage(CompositeIOException.java:37)
at org.newdawn.slick.util.DefaultLogSystem.error(DefaultLogSystem.java:32)
at org.newdawn.slick.util.Log.error(Log.java:109)
at org.newdawn.slick.Image.<init>(Image.java:198)
at org.newdawn.slick.Image.<init>(Image.java:170)
at org.newdawn.slick.Image.<init>(Image.java:158)
at org.newdawn.slick.Image.<init>(Image.java:136)
at slick.path2glory.tutorial1.SlickBasicGame.init(SlickBasicGame.java:27)
at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:390)
at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:314)
at slick.path2glory.tutorial1.SlickBasicGame.main(SlickBasicGame.java:85)

the code i am using is at the end of this page under "Full Source Code":

http://www.slick2d.org/wiki/index.php/Spiegel_tutorials/01_-_A_Basic_Slick_Game

Edited by Darego, 11 January 2013 - 06:01 AM.

### #7Darego  Members

156
Like
0Likes
Like

Posted 11 January 2013 - 06:07 AM

found the problem. the plane image was corrupt for some reason, i made a new one and it worked. thanks again guys

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.