Libraries...!! Help!!

where do i have to put those xith-3ds’s libraries in my java?? which directory and folder??

the xith-3ds i download contains this files
model (folder)
org (folder)
xith-3ds.jar
test.bat
TDStest.java

i tried to put in the jre/lib/ext directory but it can not locate these

import com.xith3d.scenegraph.Locale;
import com.xith3d.scenegraph.BranchGroup;
import com.xith3d.scenegraph.Canvas3D;
import com.xith3d.scenegraph.DirectionalLight;
import com.xith3d.scenegraph.AmbientLight;
import com.xith3d.scenegraph.TransformGroup;
import com.xith3d.scenegraph.Transform3D;

import com.xith3d.render.RenderOptions;
import com.xith3d.render.Option;
import com.xith3d.render.CanvasPeer;

Please help me out…thanks

thanks

I am guessing Windows?

You need to put the files where the JDK can find it not just the JRE. All you really need to do is set the CLASSPATH to include the directory that you want to add all the files to. If you are running any other OS it should be the same thing. This should work for the libraries. For the models, I am going to guess that you should put those either in a place that your program can see or the directory which is the home for the program.
I hope this helps

Like my predecessor wrote… You need to tell your JVM where the JAR libs are.

Xith bases on Vecmath and Jogl. In order to run Jogl you’ve to put the native binding of Jogl in an path findable by your OS. In case of Windows put the Jogl.dll into one folder of your (Windows) PATH variable. Or put it next to your application.

Jogl.jar and jogl.dll you can download here: https://games-binaries.dev.java.net/build/
The Xith.jar and vecmath.jar you can download here: http://www.xith.org/download.php

Because you use Kevin’s 3dsloader, his lib named xith-3ds.jar is for you, too.
So in the end you need to tell your JVM the (class-) path to these four JARs:

  • xith.jar
  • vecmath.jar
  • jogl.jar
  • xith-3ds.jar

So, put the JARs into a lib folder (for example) next to your classes folder and then do:
java -cp yourclasses;lib/xith.jar;lib/vecmath.jar;lib/jogl.jar;lib/xith-3ds.jar yourpackage.YourStarterclass

In case you want to compile and use the thing just within your IDE, tell your IDE the paths to these JARs and voila. Usually it’s called “configure library” or such.

PS: In case that’s not handy you can always unzip all the four JARs and bundle them into one JAR, or even bundle their classes with your final application. Still the jogl.dll you’ll always need seperately.

java -cp yourclasses;lib/xith.jar;lib/vecmath.jar;lib/jogl.jar;lib/xith-3ds.jar yourpackage.YourStarterclass

can you give me an example?? im not really clear about the above command…
:slight_smile:
-yourclasses
-yourpackage.YourStarterclass

Please specify for me…thanks alot…hehe

[quote]java -cp yourclasses;lib/xith.jar;lib/vecmath.jar;lib/jogl.jar;lib/xith-3ds.jar yourpackage.YourStarterclass

can you give me an example?? im not really clear about the above command…
:slight_smile:
-yourclasses
-yourpackage.YourStarterclass
[/quote]
That’s just the “raw metal” way, ie in a command shell (Dosbox in Windows). http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/java.html

In case you use a nice IDE you usually just have to give the path(s) to the mentioned JARs to the IDE’s library and when you run your Xith application within the IDE it does use that classpath thing automatically.