Lesson 3 Problem

4 replies [Last post]
Offline
Joined: 02/24/2011

Hello! I have a problem with the 3rd lesson: Creating a Complete Application. I`ve copied the source code from the webpage and created a Game class. After calling the "play()"-method on an instanciated object of the Game class I get following Error message:
 
java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1028) at org.lwjgl.Sys$1.run(Sys.java:73) at java.security.AccessController.doPrivileged(Native Method) at org.lwjgl.Sys.doLoadLibrary(Sys.java:66) at org.lwjgl.Sys.loadLibrary(Sys.java:82) at org.lwjgl.Sys.(Sys.java:99) at org.lwjgl.opengl.Display.(Display.java:130) at com.jme.system.lwjgl.LWJGLDisplaySystem.initDisplay(LWJGLDisplaySystem.java:418) at com.jme.system.lwjgl.LWJGLDisplaySystem.createWindow(LWJGLDisplaySystem.java:143) at env3d.Env.initSystem(Env.java:844) at env3d.Env.(Env.java:156) at env3d.Env.(Env.java:137) at Game.play(Game.java:18)
 

Offline
Joined: 12/13/2010
Which OS are you using?  This

Which OS are you using?  This problem has to do with the fact that java cannot find the native opengl libraries during run-time.  I have this problem on linux, but not on windows or mac.

If you are indeed on linux, there is a workaround... add this line before the creation of the Env() object: 

System.setProperty("org.lwjgl.librarypath", "/path/to/env3d_project/");

This line will tell java where to look for the opengl libraries, which is located in your env3d project.

Offline
Joined: 02/24/2011
@jmadar: thank you for your

@jmadar:
thank you for your help!
I`m using linux (ubuntu 10.10).
I inserted the setProperty line in my code and the play() method worked without any error
but still can´t move around with w,a,s,d + mouse as described in the lesson
I just see a static simplegame window with a doty; no reaction on any key (only [ESC] works)

Offline
Joined: 12/13/2010
Try adding this line right

Try adding this line right before the while() loop:

env.setDefaultControl(true);

If this doesn't work, do you mind posting your complete code? 

Offline
Joined: 02/24/2011
Great! now it works! thank

Great! now it works!
thank you