UnsatisfiedLinkError runtime error

gmseed
Posts: 8
Joined: Sat Sep 25, 2010 6:09 pm

UnsatisfiedLinkError runtime error

Post by gmseed »

Hi
Just imported JBullet into Netbeans and rebuilt ok.

When I run BasicDemo I get:

Code: Select all

Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1689)
        at java.lang.Runtime.loadLibrary0(Runtime.java:823)
        at java.lang.System.loadLibrary(System.java:1028)
        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:128)
        at com.bulletphysics.demos.opengl.LWJGL.main(LWJGL.java:52)
        at com.bulletphysics.demos.basic.BasicDemo.main(BasicDemo.java:228)
Java Result: 1
Has anyone else had this problem?

Graham
gmseed
Posts: 8
Joined: Sat Sep 25, 2010 6:09 pm

Re: UnsatisfiedLinkError runtime error

Post by gmseed »

Hi

I resolved this runtime exception only to encounter another!

The exception was due to being not able to locate the runtime lwjgl native libraries. I'm using Netbeans and navigating to the project properties dialog box and entering

-Djava.library.path=lib/lwjgl/win

in the VM Options text field point to the location of the native windows dlls.

However, I'm running a 64bit m/c and discovered that the ones packed with the JBullet download are for 32bit.

Thus, I then downloaded the 64bit versions from:

http://www.lwjgl.org/download.php

However, when I now run the BasicDemo I get the following exception:

Code: Select all

Exception in thread "main" java.lang.IllegalArgumentException: IntBuffer is not direct
        at org.lwjgl.BufferChecks.checkDirect(BufferChecks.java:119)
        at org.lwjgl.opengl.GL11.glGenTextures(GL11.java:1373)
        at com.bulletphysics.demos.opengl.FontRender$GLFont.load(FontRender.java:124)
        at com.bulletphysics.demos.opengl.FontRender$GLFont.<init>(FontRender.java:68)
        at com.bulletphysics.demos.opengl.LwjglGL.init(LwjglGL.java:53)
        at com.bulletphysics.demos.opengl.LWJGL.main(LWJGL.java:60)
        at com.bulletphysics.demos.basic.BasicDemo.main(BasicDemo.java:228)
gmseed
Posts: 8
Joined: Sat Sep 25, 2010 6:09 pm

Re: UnsatisfiedLinkError runtime error

Post by gmseed »

Hi

I posted the buffer problem on the LWJGL forum and got a reply:

"As of LWJGL 2.3 support for indirect buffers has been dropped. You can only use direct buffers."

Thus, JBullet will have to be upgraded or an old version used, which is difficult if 64bit is to be used.

I downloaded the older version of LWJGL-2.2.2 for 64bit and works fine.

However, JBullet really should be upgraded!

Graham