Why does this code not work? I keep getting some ugly exception about missing classes. I'm using all the jar files contained in the .tar download of M6. See below for code and error message. What .jar file am I missing?
package org.mikemccutcheon.sandbox.java3d.cubeworld; import java.io.File; import java.io.FileReader; import java.io.FileNotFoundException; import javax.media.j3d.SceneGraphObject; import org.web3d.j3d.loaders.Web3DLoader; import org.web3d.vrml.nodes.VRMLScene; import org.web3d.vrml.nodes.VRMLNodeType; import org.web3d.vrml.renderer.j3d.nodes.J3DWorldRootNodeType; public class X3DUtil { public SceneGraphObject loadX3D(String inFileName) { File file = new File(inFileName); FileReader reader = null; try { reader = new FileReader(file); } catch(FileNotFoundException fnfe) { fnfe.printStackTrace(); System.exit(1); } Web3DLoader loader = new Web3DLoader(); loader.load(reader); VRMLScene scene = loader.getVRMLScene(); VRMLNodeType baseRootNode = scene.getRootNode(); J3DWorldRootNodeType rootNode = (J3DWorldRootNodeType)baseRootNode; SceneGraphObject sceneObject = rootNode.getSceneGraphObject(); return sceneObject; } } error: Exception in thread "main" java.lang.NoClassDefFoundError: org/j3d/loaders/ManagedLoader at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:502) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:250) at java.net.URLClassLoader.access$100(URLClassLoader.java:54) at java.net.URLClassLoader$1.run(URLClassLoader.java:193) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:186) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) at java.lang.ClassLoader.loadClass(ClassLoader.java:255) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:502) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:250) at java.net.URLClassLoader.access$100(URLClassLoader.java:54) at java.net.URLClassLoader$1.run(URLClassLoader.java:193) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:186) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) at java.lang.ClassLoader.loadClass(ClassLoader.java:255) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) at org.mikemccutcheon.sandbox.java3d.cubeworld.X3DUtil.loadX3D(X3DUtil.java:33) at org.mikemccutcheon.sandbox.java3d.cubeworld.TestWorldBranch.init(TestWorldBranch.java:246 ) at org.mikemccutcheon.sandbox.java3d.cubeworld.Controller.<init>(Controller.java:123) at org.mikemccutcheon.sandbox.java3d.cubeworld.Controller.main(Controller.java:48) Alan Hudson wrote:
We'd like to announce the availability of Xj3D Milestone 6. Xj3D is a Java toolkit for implementing the X3D and VRML97 standards. Highlights of this release: Alignment with the ISO X3D FCD specification X3D XML Encoding complete Example program showing how to convert XML encoded data into X3D worlds Event Model rewrite, should be fully spec compliant Heavy ECMAscript debugging Heavy EXTERNProto debugging You can download Xj3D at: http://www.web3d.org/TaskGroups/source/xj3d.html#use Yumetech offers commercial support for this library. If you are interested please contact me at this email address or 206 340 8900. -- Alan Hudson President: Yumetech, Inc. http://www.yumetech.com/ Web3D Open Source Chair http://www.web3d.org/TaskGroups/source/ =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
=========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".