hello,<br><br>i've some problems when i compilate my file.<br>i've this error:<br>Exception occurred during event dispatching:
<br>java.lang.NoClassDefFoundError: javax/media/j3d/Group
<br> at essai1.BasicView.<init>(basicview.java:40)
<br><br><br><br><br>and here my file:<br><br>package essai1;<br>import com.interactive.v3d.view.v3dView;<br>import com.interactive.v3d.axis.v3dAxis;<br>import com.interactive.v3d.axis.v3dPlaneAxis;<br>import com.interactive.v3d.behavior.tool.*;<br>import com.interactive.v3d.model.models.v3dContainer;<br>import javax.vecmath.*;<br>import javax.media.j3d.*;<br>import java.applet.Applet;<br>import java.awt.*;<br>import java.awt.event.*;<br>import javax.swing.*;<br>public class BasicView extends JPanel//Applet<br> {<br><br>/** Initializes the window width constant to 400 pixels. */<br> protected static int WIDTH = 600;<br><br> /** Initializes the window height constant to 400 pixels. */<br> protected static int HEIGHT = 600;<br><br>public BasicView()<br>{}<br>public v3dView view;<br> protected v3dContainer _container;<br><br><br> public BasicView(String title) {<br><br> this();<br> this.init();<br> createUI(title);<br> }<br><br><br><br> public void init()<br> {<br><br> view = new v3dView();<br><br> // create a container<br> _container = new v3dContainer();<br><br> // add container into viewer<br> view.addContainer(_container);<br><br> // create a plane axis and add into viewer<br> v3dAxis axis = new v3dPlaneAxis("X", "Y", "Z"<br> view.setAxis(axis);<br><br> // Lays out the applet.<br> // setLayout(new BorderLayout());<br> // this.add(view.getCanvas3D(), BorderLayout.CENTER);<br><br><br> }<br><br>/**<br> * Displays the 3D objects to be rendered and displayed. This method<br> * is called only when <code>BasicView</code> is used as an<br> * application instead of an applet.<br> */<br> public void render(String title) {<br> this.init();<br> createUI(title);<br> }<br><br> /**<br> * Creates a 400 by 400 pixel window that can be used for displaying<br> * View 3D objects.<br> *<br> * @param app the applet to display<br> * @param title the window title<br> */<br> protected void createUI(String title) {<br> // Creates a window.<br> JFrame f = new JFrame(title);<br><br> f.getContentPane().add(this);<br> f.addWindowListener(new WindowAdapter() {<br> public void windowClosing(WindowEvent e) {<br> System.exit(0);<br> }<br> });<br> f.setSize(WIDTH, HEIGHT);<br> Dimension d = Toolkit.getDefaultToolkit().getScreenSize();<br> Point pos = new Point((d.width - WIDTH) / 2, (d.height - HEIGHT) / 2);<br> f.setLocation(pos);<br> f.show();<br> }<br><br> // Afficher un point<br> public void affiche_position (position pos)<br> {<br> }<br><br>}<br><br><br>So, if someone knows the problem !!!<br><br>Thanks in advance.<br><br>guillaume<br>
<br>java.lang.NoClassDefFoundError: javax/media/j3d/Group
<br> at essai1.BasicView.<init>(basicview.java:40)
<br><br><br><br><br>and here my file:<br><br>package essai1;<br>import com.interactive.v3d.view.v3dView;<br>import com.interactive.v3d.axis.v3dAxis;<br>import com.interactive.v3d.axis.v3dPlaneAxis;<br>import com.interactive.v3d.behavior.tool.*;<br>import com.interactive.v3d.model.models.v3dContainer;<br>import javax.vecmath.*;<br>import javax.media.j3d.*;<br>import java.applet.Applet;<br>import java.awt.*;<br>import java.awt.event.*;<br>import javax.swing.*;<br>public class BasicView extends JPanel//Applet<br> {<br><br>/** Initializes the window width constant to 400 pixels. */<br> protected static int WIDTH = 600;<br><br> /** Initializes the window height constant to 400 pixels. */<br> protected static int HEIGHT = 600;<br><br>public BasicView()<br>{}<br>public v3dView view;<br> protected v3dContainer _container;<br><br><br> public BasicView(String title) {<br><br> this();<br> this.init();<br> createUI(title);<br> }<br><br><br><br> public void init()<br> {<br><br> view = new v3dView();<br><br> // create a container<br> _container = new v3dContainer();<br><br> // add container into viewer<br> view.addContainer(_container);<br><br> // create a plane axis and add into viewer<br> v3dAxis axis = new v3dPlaneAxis("X", "Y", "Z"<br> view.setAxis(axis);<br><br> // Lays out the applet.<br> // setLayout(new BorderLayout());<br> // this.add(view.getCanvas3D(), BorderLayout.CENTER);<br><br><br> }<br><br>/**<br> * Displays the 3D objects to be rendered and displayed. This method<br> * is called only when <code>BasicView</code> is used as an<br> * application instead of an applet.<br> */<br> public void render(String title) {<br> this.init();<br> createUI(title);<br> }<br><br> /**<br> * Creates a 400 by 400 pixel window that can be used for displaying<br> * View 3D objects.<br> *<br> * @param app the applet to display<br> * @param title the window title<br> */<br> protected void createUI(String title) {<br> // Creates a window.<br> JFrame f = new JFrame(title);<br><br> f.getContentPane().add(this);<br> f.addWindowListener(new WindowAdapter() {<br> public void windowClosing(WindowEvent e) {<br> System.exit(0);<br> }<br> });<br> f.setSize(WIDTH, HEIGHT);<br> Dimension d = Toolkit.getDefaultToolkit().getScreenSize();<br> Point pos = new Point((d.width - WIDTH) / 2, (d.height - HEIGHT) / 2);<br> f.setLocation(pos);<br> f.show();<br> }<br><br> // Afficher un point<br> public void affiche_position (position pos)<br> {<br> }<br><br>}<br><br><br>So, if someone knows the problem !!!<br><br>Thanks in advance.<br><br>guillaume<br>