Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (494)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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  
  [ODEjava] integrating ODEjava in Eclipse-Project  (Read 2240 times)
0 Members and 1 Guest are viewing this topic.
Offline Ramona

Senior Newbie




Java games rock!


« Posted 2005-04-29 11:36:06 »

Hi all,

I'm sorry that I have to ask for the installing of ODEjava, too. But I couldn't find an answer for my problem.

I'd like to extend a Java3D system with ODEjava (Windows). My IDE is Eclipse. I have downloaded the .dll and the .jar and added them to my workspace. Then I have added the .jar to my classpath.

If I start the program, I get an UnsatisfiedLinkError. So I think that the c++ part (ODE) will not be found.

What have I forgotten?

Bye
Ramona
Offline darkprophet

Senior Member




Go Go Gadget Arms


« Reply #1 - Posted 2005-04-29 12:28:49 »

when you are running the program from eclipse. Go to Run > Run..

Then click new, it should come up with your class. Now go to the tab labled "(x)= Arguments" and in the VM arguments text field, type:

1  
-Djava.library.path="./lib/";


This assumes you have your odejava.dll in a folder called lib in the project space.

And thats it, it should run Smiley

DP

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline darkprophet

Senior Member




Go Go Gadget Arms


« Reply #2 - Posted 2005-04-29 12:30:09 »

when you are running the program from eclipse. Go to Run > Run..

Then click new, it should come up with your class. Now go to the tab labled "(x)= Arguments" and in the VM arguments text field, type:

1  
-Djava.library.path="./lib/";


This assumes you have your odejava.dll in a folder called lib in the project space.

And thats it, it should run Smiley

DP

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Ramona

Senior Newbie




Java games rock!


« Reply #3 - Posted 2005-04-29 13:04:03 »

I tried this before, but it didn't helps. I added the odejava.dll folder ${workspace_loc:lib/ode/20041030/win32/x86} to th arguments.

So my VM arguments looks like this now:

1  
-Xmx256m -Djava.library.path="${workspace_loc:lib/java3d/1.3.1/win32/x86};${workspace_loc:lib/ode/20041030/win32/x86}"


So there must be another problem.
Offline darkprophet

Senior Member




Go Go Gadget Arms


« Reply #4 - Posted 2005-04-29 14:36:25 »

${workspace_loc:lib/ode/20041030/win32/x86} is an eclipse variable that eclipse will understand. The JVM will not understand that.

Say you have the following folder heirarchy:

workspace --> ProjectX --> src --> com --> projectX....
                                     --> bin --> com --> projectX
                                     --> data --> textures --> Hello.jpg
                                     --> lib --> odejava.dll

                 --> ProjectY --> ....

Can you see where you need to place the odejava.dll now? And do this:

-Djava.library.path="./lib/";

DP

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline Ramona

Senior Newbie




Java games rock!


« Reply #5 - Posted 2005-04-29 17:21:00 »

After your answer I also tried it with

-Djava.library.path="./lib/";

But it doesn't work.

And I understand your comment to the eclipse variable. But I think it should work, because $workspace_loc returns only the absolute file system path of the workspace root and not of the project. And "lib" is the project.

Anyway, it also works for java3d:

-Djava.library.path="${workspace_loc:lib/java3d/1.3.1/win32/x86}

Why shouldn't it work with odejava?
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #6 - Posted 2005-05-01 00:42:30 »

Personally, I cheat and add native libaries to my system's Java Library Path.

[if you need, there's a bit of info about this under "Discovering the correct paths." in this doc: http://xith.org/Installing]

Works great Smiley

Will.

Offline Ramona

Senior Newbie




Java games rock!


« Reply #7 - Posted 2005-05-01 09:15:46 »

Thanks for your suggestion, but I'm sorry that I still have to say: It doesn't work.

My system's Java Library Path is:
1  
Native Library path(s): C:\Documents and Settings\Moni\My Documents\Diplomarbeit\Implementierung\Impl 3\lib\java3d\1.3.1\win32\x86;C:\Documents and Settings\Moni\My Documents\Diplomarbeit\Implementierung\Impl 3\lib\ode\20041030\win32\x86


And the odejava.dll is in the folder:
1  
C:\Documents and Settings\Moni\My Documents\Diplomarbeit\Implementierung\Impl 3\lib\ode\20041030\win32\x86


I also copied it to my "jre/bin"-folder, but it doesn't help.

Maybe the problem is another. So here is the exception I get:
1  
2  
3  
4  
5  
6  
7  
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 core.view.java3d.loader.Java3dLoader.loadScene(Java3dLoader.java:103)
      at region.view.java3d.Java3dRModelView$ModelUpdater.run(Java3dRModelView.java:85)
      at java.lang.Thread.run(Thread.java:534)

Maybe I misinterpreted this exception. I hope somebody can help me!
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #8 - Posted 2005-05-01 22:22:51 »

That is a very unusual java native path.  "My Documents" huh?

Perhaps my shortcut won't be a short cut for you.  You could try the more standard locations though like C:\Windows\System32.

I believe you have interperated the error correctly, it can't find the native library.

Will.

Offline Ramona

Senior Newbie




Java games rock!


« Reply #9 - Posted 2005-05-02 06:26:56 »

Oh I know this is an very unusual path. The path looks like this because of the VM arguments of the Eclipse project (see above).  Because different person works on this project and everybody has another location to save their workspaces, the native libraries are located in the workspace and the VM arguments are setted this way.

Anyway I will try your new suggestion. I'm just happy when I can start programming.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Ramona

Senior Newbie




Java games rock!


« Reply #10 - Posted 2005-05-03 17:23:58 »

I tried it out with different standard locations, e.g. C:\Windows\System32 and C:\j2sdk1.4.2_06\bin.

But it didn't work, too.

I continue trying various things. But if anybody has another idea, I'll appreciate.
Offline Ramona

Senior Newbie




Java games rock!


« Reply #11 - Posted 2005-05-04 13:15:34 »

Smiley I've got the solution to my problem. Smiley

My  Java Library Path is okay. I only forgot to load the library with:
1  
System.loadLibrary("odejava");

Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #12 - Posted 2005-05-05 21:44:24 »

oh dear.

Well done on solving your problem.

Do you want to add a new entry to the Odejava FAQ describing this error and the solution so others are saved the time?

Cheers,

Will.

Offline Ramona

Senior Newbie




Java games rock!


« Reply #13 - Posted 2005-05-06 09:36:56 »

Of course I can write a new entry about this problem. What do I have to do?
I have just registered to the odejava.org-homepage.
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #14 - Posted 2005-05-06 23:25:54 »

when logged in, on the FAQ page, click the "Show suggested questions/suggest a question " link at the bottom of the page.

Thanks!

Will.

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.

Dwinin (21 views)
2014-09-12 09:08:26

Norakomi (55 views)
2014-09-10 13:57:51

TehJavaDev (66 views)
2014-09-10 06:39:09

Tekkerue (33 views)
2014-09-09 02:24:56

mitcheeb (54 views)
2014-09-08 06:06:29

BurntPizza (38 views)
2014-09-07 01:13:42

Longarmx (24 views)
2014-09-07 01:12:14

Longarmx (30 views)
2014-09-07 01:11:22

Longarmx (28 views)
2014-09-07 01:10:19

mitcheeb (37 views)
2014-09-04 23:08:59
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

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!