Basic startup problem...

Hi all… first post here…

I`ve used ODE a fair bit with C++ and had a lot fo fun with it.

I`m currently trying to convert some of my old dodgy demos across into java for a uni project.

I`ve downloaded the latest natives and .jar and have no problems compiling the code, but when I try to execute the program I get this error…

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.(World.java:112)
at MainGame.initialise(MainGame.java:124)
at MainGame.main(MainGame.java:63)

There`s obviously some problem with runtime linking to the ODE native…

I`m using the opengl Java bindings no problem and they work a treat.

Has anyone else encountered this problem?

Cheers.

Yes put odejava.dll in your classpath then call

System.loadLibrary(“odejava”);

Before you do any odejava stuff

When that works youll also need org.apache.log4j.Logger

Get it here…
http://logging.apache.org/log4j/docs/download.html

thanks.

i`d got to the log4j stuff already but your post helped a great deal.

cheers.

Groovy it`s working now… thanks.

hi there
i am geting the same dWorldCreate() error
i added the odejava.dll to the classpath
and got the log4j and it i am still geting the same error

can u please help thanks
here is the run time exception

Exception in thread “main” 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.(World.java:112)
at BasicOdejavaExample.(BasicOdejavaExample.java:65)
at BasicOdejavaExample.main(BasicOdejavaExample.java:141)
Press any key to continue . . .

and also

System.loadLibrary(“odejava”);

?

yes
as a matter of fact am trying to run the example on the tutorial
just for the record i am using windows xp
thanks

here is its header…

import javax.vecmath.*;

import org.odejava.;
import org.odejava.collision.
;
import org.odejava.ode.Ode;

public class BasicOdejavaExample {

private World world;
private Space space;
private JavaCollision collision;
public static final Vector3f gravity = new Vector3f(0f,-9.82f,0f);

// Loads the Odejava library (optional but will though an error
// sooner if it can't be found.
static {
	System.loadLibrary("odejava");
}

and does have in it self the System.loadLibrary(“odejava”);

here is also a screen shot of the classpath
incase if u need to see it
thanks

mmh I just looked at my own source code and I’m only doing this (in the constructor of my main class)


        Odejava.getInstance();
        World world = new World();

hi there folk
i guess i figured how to make it work
here is a snap shot of the code that need to be corrected :slight_smile:


import javax.vecmath.*;

import org.odejava.;
import org.odejava.collision.
;
import org.odejava.ode.Ode;

public class BasicOdejavaExample {

private World world;
private Space space;
private JavaCollision collision;
public static final Vector3f gravity = new Vector3f(0f,-9.82f,0f);

// Loads the Odejava library (optional but will though an error
// sooner if it can't be found.
static {
	System.loadLibrary("odejava");
	Odejava.getInstance();

}

// add the the Odejava.getInstance () after the System.loadLibrary(“odejava”); statement

thanks and good luck