ODEJAVA world create problem....

Hi All!
I’m download from the edojava.org library odejava…and have an problem with initialing the world…

for example i’m just writing the code:

World world = new World();

and compiller takes me this exception…


java.lang.UnsatisfiedLinkError: dWorldCreate
	at org.odejava.ode.OdeJNI.dWorldCreate(Native Method)
	at org.odejava.ode.Ode.dWorldCreate(Ode.java:526)
	at org.odejava.World.<init>(World.java:112)

…and can i use it(ode) with jogl???

The error is raised on execution not by the compiler. You need to add the directory containing the native libraries (dll/so/jnilib) to the java library path with the VM switch -Djava.library.path=path/to/bin/ or configure it in your IDE (Netbeans or Eclipse can configure them for the module/project).

And of course you can use it with jogl.

thanks! but problem was funny…i don’t write Odejava.getInstance(); :wink:

I believe that it’s linked in a static block of code, so if you import the classes, it tries to load the natives.

a…i’m loading library in a static part of class:


public class ...{
    static{
        System.loadLibrary("odejava");
        Odejava.getInstance();
    }

...//some code
}

it will be true?:slight_smile: