Problem with Java3D and Eclipse...
I'm not sure if it's only going to happen in Eclipse, but that's where I'm having the issue. I installed the Java3D API for openGL in Windows. I set up an app using the library, including the references in the project settings, which it appears to get, because I don't get any "object not defined" errors or anything.
However, when it hits this line:
<code>
java.lang.UnsatisfiedLinkError: no J3D in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknow n Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at javax.media.j3d.MasterControl$22.run(Mas terControl.java:889)
at java.security.AccessController.doPrivile ged(Native Method)
at javax.media.j3d.MasterControl.loadLibrar ies(MasterControl.java:886)
at javax.media.j3d.VirtualUniverse.<clinit> (VirtualUniverse.java:229)
at Hello3D.<init>(Hello3D.java:21)
at sun.reflect.NativeConstructorAccessorImp l.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImp l.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccesso rImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstanc e(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unkn own Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
</code> And of course, since it's short, the whole program:
<code>
public class Hello3D extends Applet {
public Hello3D() {
setLayout(new BorderLayout());
GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration( );
Canvas3D c = new Canvas3D(config);
add("center", c);
BranchGroup scene = createSceneGraph();
scene.compile();
SimpleUniverse u = new SimpleUniverse(c);
u.getViewingPlatform().setNominalViewing Transform();
u.addBranchGraph(scene);
}
public BranchGroup createSceneGraph() {
BranchGroup objRoot = new BranchGroup();
objRoot.addChild(new ColorCube(0.4));
return objRoot;
}
}
</code>
Some of you may recognize this as the Hello3D app from the Java3d tutorial.
The quoted line above is line 21 in Hello3D.java. Any good way to fix this?
However, when it hits this line:
GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration( );, it crashes, throwing this stack trace:java.lang.UnsatisfiedLinkError: no J3D in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknow
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at javax.media.j3d.MasterControl$22.run(Mas
at java.security.AccessController.doPrivile
at javax.media.j3d.MasterControl.loadLibrar
at javax.media.j3d.VirtualUniverse.<clinit>
at Hello3D.<init>(Hello3D.java:21)
at sun.reflect.NativeConstructorAccessorImp
at sun.reflect.NativeConstructorAccessorImp
at sun.reflect.DelegatingConstructorAccesso
at java.lang.reflect.Constructor.newInstanc
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unkn
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
</code> And of course, since it's short, the whole program:
<code>
public class Hello3D extends Applet {
public Hello3D() {
setLayout(new BorderLayout());
GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration(
Canvas3D c = new Canvas3D(config);
add("center", c);
BranchGroup scene = createSceneGraph();
scene.compile();
SimpleUniverse u = new SimpleUniverse(c);
u.getViewingPlatform().setNominalViewing
u.addBranchGraph(scene);
}
public BranchGroup createSceneGraph() {
BranchGroup objRoot = new BranchGroup();
objRoot.addChild(new ColorCube(0.4));
return objRoot;
}
}
</code>
Some of you may recognize this as the Hello3D app from the Java3d tutorial.
The quoted line above is line 21 in Hello3D.java. Any good way to fix this?
