Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (522)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (590)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Basic startup problem...  (Read 2606 times)
0 Members and 1 Guest are viewing this topic.
Offline plonkman

Junior Newbie




Java games rock!


« Posted 2004-11-23 10:55:17 »

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.<init>(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.
Offline NewbTon

Junior Devvie




Odejava games rock!


« Reply #1 - Posted 2004-11-23 17:24:27 »

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
Offline plonkman

Junior Newbie




Java games rock!


« Reply #2 - Posted 2004-11-23 17:50:59 »

thanks.

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

cheers.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline plonkman

Junior Newbie




Java games rock!


« Reply #3 - Posted 2004-11-23 18:17:57 »

Groovy it`s working now... thanks.
Offline m_ali_alex

Senior Newbie





« Reply #4 - Posted 2006-01-31 21:50:10 »

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

Offline arne

Senior Devvie




money is the worst drug- we should not let it rule


« Reply #5 - Posted 2006-01-31 21:58:25 »

and also

System.loadLibrary("odejava");

?

:: JOODE :: Xith3d :: OdeJava ::
Offline m_ali_alex

Senior Newbie





« Reply #6 - Posted 2006-01-31 22:02:39 »

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");
Offline m_ali_alex

Senior Newbie





« Reply #7 - Posted 2006-01-31 22:12:59 »

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

Senior Devvie




money is the worst drug- we should not let it rule


« Reply #8 - Posted 2006-01-31 22:18:50 »

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

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

:: JOODE :: Xith3d :: OdeJava ::
Offline m_ali_alex

Senior Newbie





« Reply #9 - Posted 2006-01-31 22:29:41 »

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 Smiley


**************************************************

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
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

trollwarrior1 (29 views)
2014-11-22 12:13:56

xFryIx (71 views)
2014-11-13 12:34:49

digdugdiggy (50 views)
2014-11-12 21:11:50

digdugdiggy (44 views)
2014-11-12 21:10:15

digdugdiggy (38 views)
2014-11-12 21:09:33

kovacsa (62 views)
2014-11-07 19:57:14

TehJavaDev (67 views)
2014-11-03 22:04:50

BurntPizza (64 views)
2014-11-03 18:54:52

moogie (80 views)
2014-11-03 06:22:04

CopyableCougar4 (80 views)
2014-11-01 23:36:41
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!