java.lang.UnsatisfiedLinkError: no lwjgl

Hi All



I've just started with jme and tried to run the examples in the TutorialGuide

I'm using the jme from http://jmonkeyengine.googlecode.com/svn/trunk



When I try to run an example I get:



WARNING: Could not load properties. Creating a new one.
Nov 13, 2008 10:57:46 AM class jmetest.TutorialGuide.HelloAnimation start()
SEVERE: Exception in game loop
java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1753)
   at java.lang.Runtime.loadLibrary0(Runtime.java:823)
   at java.lang.System.loadLibrary(System.java:1030)
   at org.lwjgl.Sys$1.run(Sys.java:72)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.lwjgl.Sys.doLoadLibrary(Sys.java:65)
   at org.lwjgl.Sys.loadLibrary(Sys.java:81)
   at org.lwjgl.Sys.<clinit>(Sys.java:98)
   at org.lwjgl.opengl.Display.<clinit>(Display.java:129)
   at com.jme.system.lwjgl.LWJGLPropertiesDialog$ModesRetriever.run(LWJGLPropertiesDialog.java:682)
   at com.jme.app.AbstractGame.getAttributes(AbstractGame.java:231)
   at com.jme.app.BaseGame.start(BaseGame.java:64)
   at jmetest.TutorialGuide.HelloAnimation.main(HelloAnimation.java:60)
Nov 13, 2008 10:57:46 AM com.jme.app.BaseSimpleGame cleanup
INFO: Cleaning up resources.
Nov 13, 2008 10:57:46 AM com.jme.system.lwjgl.LWJGLDisplaySystem <init>
INFO: LWJGL Display System created.
Nov 13, 2008 10:57:46 AM com.jme.app.BaseGame start
INFO: Application ending.


I'm using lwjgl-2.0 and in (eclipse) Properties -> Java Build Path I see lwjgl_util_applet.jar, lwjgl_util.jar and lwjgl.jar

Any suggestions why I get this error
Thnx
LuCa

ps I'm running eclipse on a Mac

http://www.jmonkeyengine.com/wiki/doku.php?id=the_faq, search for java.library.path



I would recommend fixing it by setting the java.library.path variable.



edit: you can also follow the Eclipse tutorial on the wiki! even better…

thnx, that works:



java -Djava.library.path=/usr/local/lib jmetest.TutorialGuide.HelloState



I'm still not able to run the example from within eclipse. I tried to add agrument options (Run As -> Configuration), but didn't work. Any suggestions where it should be added so it works for the whole project ?

LuCa

Why would you put the jME libraries in /usr/local/lib ?? Did you really put them there?



There is a much better way described in the Eclipse tutorial in the wiki, so please follow that.

I only have  the lwjgl (which are: libjinput-osx.jnilib, liblwjgl.jnilib and openal.dylib) libs in there.

I was able to start (not really run) the examples after I placed


-Djava.library.path=/usr/local/lib


in the VM Arguments area. After I click the 'OK' button I get the following error:


NFO: Child (labelGraph) attached to this node (Graph node)
Nov 13, 2008 2:01:31 PM class jmetest.TutorialGuide.TestPongCool start()
SEVERE: Exception in game loop
java.lang.NoSuchMethodError: Method org.lwjgl.openal.AL10.alEnable(I)V is not declared as native
   at org.lwjgl.openal.AL10.initNativeStubs(Native Method)
   at org.lwjgl.openal.AL.init(AL.java:158)
   at org.lwjgl.openal.AL.create(AL.java:150)
   at org.lwjgl.openal.AL.create(AL.java:104)
   at org.lwjgl.openal.AL.create(AL.java:191)
   at com.jmex.audio.openal.OpenALSystem.<init>(OpenALSystem.java:77)
   at com.jmex.audio.AudioSystem.getSystem(AudioSystem.java:63)
   at jmetest.TutorialGuide.TestPongCool.initSound(TestPongCool.java:309)
   at jmetest.TutorialGuide.TestPongCool.simpleInitGame(TestPongCool.java:254)
   at com.jme.app.BaseSimpleGame.initGame(BaseSimpleGame.java:527)
   at com.jme.app.SimplePassGame.initGame(SimplePassGame.java:100)
   at com.jme.app.BaseGame.start(BaseGame.java:71)
   at jmetest.TutorialGuide.TestPongCool.main(TestPongCool.java:130)
Nov 13, 2008 2:01:31 PM com.jme.app.BaseSimpleGame cleanup
INFO: Cleaning up resources.
Nov 13, 2008 2:01:31 PM com.jme.app.BaseGame start
INFO: Application ending.

Still something wrong with the OpenAL libs it seems. Still something missing (or maybe a version conflict)/

You can try running examples without sound though.

From the command-line I don't have this problem! So it clearly is an eclipse issue. Anyway, I don't need sound, any suggestions how to turn sound of in eclipse ?



thnx a lot

LuCa

Well, just not using any of the sound APIs should do the trick.



As for Eclipse, step 10 in the tutorial (last bit) never fails me (I'm on a mac too, so…). Depending on your eclipse version they might have changed the naming a bit.