title: Class in jar not found at runtime, but was used to compile
body: <p>After I build this project from an ant file, I recieve a jar that contains all of the classes I built. When I try to run this jar, I get the following error: </p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/j3d/SceneGraphObject
  </code></pre>
  
  <p>This error indicates that a one of the jars, specifically the <code>j3dcore.jar</code> from java3d, I am using can not be found. However, this jar is on the classpath when compiling through the ant build into the class files. </p>
  
  <p>Why can this class not be found at runtime, but it is found at compile time? Do I have to manually change my classpath in my shell when running the jar as well as change it in the ant build?</p>
  
  <p>If I add the jars to my classpath using <code>java -cp j3d/*.jar  -jar idv.jar</code></p>
  
  <p>I get the error <code>Error: Could not find or load main class j3d.j3dutils.jar</code></p>