LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: Aslan on July 10, 2012, 20:04:24

Title: LWJGL not working
Post by: Aslan on July 10, 2012, 20:04:24
Hello fellow programmers,

I have tried several times to get LWJGL working in Java.
However I didn't succeed.
I seem to get the same bug everytime.
According to the bug report the natives aren't in the correct location.

I followed a few exact tutorials on how to implement LWJGL into Eclipse.

http://i.imgur.com/Xv8kn.jpg

Bug report and files are in the picture given above.

Thanks in advance,

Aslan

P.S. I tried referring internally and externally, but both give the same result.
Title: Re: LWJGL not working
Post by: Aslan on July 10, 2012, 21:25:30
Bump
Title: Re: LWJGL not working
Post by: CodeBunny on July 11, 2012, 03:19:49
Do normal LWJGL applications work on your system? Such as this? http://www.minds-eye-games.com/applets/pong-applet.html (http://www.minds-eye-games.com/applets/pong-applet.html)
Title: Re: LWJGL not working
Post by: Simon Felix on July 11, 2012, 11:15:15
Move the natives to the root of the project (or whatever is set as startup directory of your app in the Run configuration).
Title: Re: LWJGL not working
Post by: CodeBunny on July 11, 2012, 11:51:42
@Simon That is not a good way to fix this.

Checking to see if he can run other, already working projects determines if it's a problem with his system instead of his setup. If it is a problem with his setup, he should fix it properly.
Title: Re: LWJGL not working
Post by: Aslan on July 11, 2012, 15:49:45
I can play Minecraft normally, which is based on LWJGL if I'm correct.
The applet gave an error though: "Unable to load logo and progressbar images"
Title: Re: LWJGL not working
Post by: CodeBunny on July 11, 2012, 17:11:15
Hmm. Odd. I'm not quite sure what to say - I don't know the internal details of LWJGL that well.   :-\
Title: Re: LWJGL not working
Post by: kulpa on July 12, 2012, 08:25:22
I also get the same error with that applet, but I can run minecraft via applet, so that's not the problem.

Your eclipse setup isn't complete.

check this page: http://www.lwjgl.org/installation.php
or better here: http://www.lwjgl.org/wiki/index.php?title=Setting_Up_LWJGL_with_Eclipse


You need to link the jars (seems to work for you) and link the natives(may be the problem). I know years ago I had to put '-Djava.library.path=natives/linux64' (I'm a linux user) to VM argumetns in run configurations. But You can also try to set the natives like in the second link  (which seems to be more modern approach)