Can't load Xith3D - Help!!

I’m new to Xith3D (and java for that matter), and I’m having some trouble getting the HelloXith3D.java file to compile. I followed all the instructions in the Getting started guide, here’s the error I get:

C:\xith3d\xith3d-0.7.1\xith3d>javac -classpath C:\xith3d\xith3d-0.7.1\xith3d\lib
s\xith3d.jar;C:\xith3d\third-party\third-party\vecmath\vecmath.jar;C:\Program%20
Files\Java\jre1.5.0_06\bin\.;C:\Program%20Files\Java\jre1.5.0_06\lib\ext\. Hello
Xith3D.java
HelloXith3D.java:11: package com.xith3d.render.jogl does not exist
import com.xith3d.render.jogl.*;
^
HelloXith3D.java:36: cannot access com.xith3d.scenegraph.VirtualUniverse
bad class file: C:\xith3d\xith3d-0.7.1\xith3d\libs\xith3d.jar(com/xith3d/scenegr
aph/VirtualUniverse.class)
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the correct subdirectory of the classpa
th.
                VirtualUniverse universe = new VirtualUniverse();
                ^
2 errors

Any ideas? Thanks!

ohh good that you’ve pointed that out, we changed the demo testcases, but we seem to have forgotten to also update the getting started guide.
If you want to use jogl to render your scene, you’ll now have to write

import com.xith3d.render.jsr231

instead of

import com.xith3d.render.jogl

So… anybody going to change the getting started guide?

Thanks for your help arne, but I’m still having the problem. I changed the line to com.xith3d.render.jsr231, it still unfortunately doesn’t work. I’m getting the same error. Any ideas?

new xith jar files are compiled with java 1.5 (class version 49)

and you’re trying to run it with java 1.4 (class version 48)

You have to update your sdk…

Lilian :slight_smile:

That’s not a small work. In fact, the GSG is full of errors (many things have changed since it was first written) and maybe some chapters may require a rewrite. I’m actually a bit busy with my project (as always… ^^) but If there’s a real interest I could take a look.

Ok - I updated my SDK, now I’m getting that dandy NoClassDefFound error when I try to run it. I tried doing everything the GSG said ot fix it, no luck :(.

Here’s what I’m using:

C:\xith3d\xith3d-0.7.1\xith3d>javac -classpath libs/xith3d.jar;C:\xith3d\third-p
arty\third-party\vecmath\vecmath.jar HelloXith3D.java

C:\xith3d\xith3d-0.7.1\xith3d>java -cp libs/xith3d.jar;C:\xith3d\third-party\thi
rd-party\vecmath\vecmath.jar HelloXith3D
Exception in thread "main" java.lang.NoClassDefFoundError: HelloXith3D

Might want to try putting a “.” in your classpath:


C:\xith3d\xith3d-0.7.1\xith3d>java -cp .;libs/xith3d.jar;C:\xith3d\third-party\thi
rd-party\vecmath\vecmath.jar HelloXith3D
Exception in thread "main" java.lang.NoClassDefFoundError: HelloXith3D

Kev

Ok - added the period. Still having issues. I even switched my version of xith to the 8/31/2005 version that I was ableto get working before. Here’s what I’m getting:

C:\xith3d\xith3d>java -cp libs/xith3d.jar;.;C:\xith3d\third-party\third-party\ve
cmath\vecmath.jar;C:\xith3d\third-party\third-party\jogl\jogl.jar com.xith3d.tes
t.CubeTest
Exception in thread “main” java.lang.NoClassDefFoundError: com/sun/opengl/util/B
ufferUtil
at com.xith3d.render.jsr231.ShapeAtomPeer.(ShapeAtomPeer.java:660)

    at com.xith3d.render.jsr231.RenderPeerImpl.<init>(RenderPeerImpl.java:64

)
at com.xith3d.test.CubeTest.(CubeTest.java:139)
at com.xith3d.test.CubeTest.main(CubeTest.java:212)

Thanks so much for all your help! I hope I’ll be able to get this working…

you using the latest jogl version? - I don’t know if the one in the xith3d thirdparty package has been updated. You’ll better get your jogl from jogl.dev.java.net. And don’t try to run it with the old Xith version - the jsr renderer is new, so there might be other problems occuring there.

Fixed! You’re a genius Arne! I can’t thank you all enough!

I know : I updated it. From Xith3D 0.7.1 (which was one of the reason why it has been released).