High priority java.lang.NoClassDefFoundError: javax/media/opengl/GLCapabilitiesChooser

This topic has been viewed 4744 times and has 2 replies
Thread status: Active
Questions about extending features and developing plug-ins [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
Post Reply New Topic
danielfranklinr
Posts: 7
Joined: Thu Apr 05, 2012 5:14 pm
Country: Caracas, Distrito Capital, Venezuela

java.lang.NoClassDefFoundError: javax/media/opengl/GLCapabilitiesChooser

Post by danielfranklinr »

Hello everyone.

I just downloaded SweetHome 3d v3.4 src and followed the instructions given in the readme file to install it on a OS x 10.7.2.

The project was succesfully imported into eclipse and the VM argument -Djava.ext.dirs=lib:lib/macosx was included to run the project as a Java Application (SweetHome3d.java) and a Java Applet (SweetHome3dViewer.java)

The Java Application runs just fine, but when i start the Applet it gives me the following stack trace:

Code: Select all


java.lang.NoClassDefFoundError: javax/media/opengl/GLCapabilitiesChooser
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:169)
	at javax.media.j3d.Pipeline$1.run(Pipeline.java:162)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.media.j3d.Pipeline.createPipeline(Pipeline.java:157)
	at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:965)
	at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:299)
	at javax.media.j3d.GraphicsConfigTemplate3D.getBestConfiguration(GraphicsConfigTemplate3D.java:321)
	at java.awt.GraphicsDevice.getBestConfiguration(GraphicsDevice.java:159)
	at com.eteks.sweethome3d.j3d.Component3DManager.<init>(Component3DManager.java:65)
	at com.eteks.sweethome3d.j3d.Component3DManager.getInstance(Component3DManager.java:100)
	at com.eteks.sweethome3d.applet.ViewerHelper.addComponent3DRenderingErrorObserver(ViewerHelper.java:372)
	at com.eteks.sweethome3d.applet.ViewerHelper.<init>(ViewerHelper.java:295)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.eteks.sweethome3d.applet.SweetHome3DViewer.createAppletApplication(SweetHome3DViewer.java:172)
	at com.eteks.sweethome3d.applet.SweetHome3DViewer.init(SweetHome3DViewer.java:70)
	at sun.applet.AppletPanel.run(AppletPanel.java:424)
	at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.ClassNotFoundException: javax.media.opengl.GLCapabilitiesChooser
	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	... 21 more
I went to the directory lib/macosx and the following files could be found:

gluegen-rt.jar
jogl.jar
libgluegen-rt.jnilib
libjogl_awt.jnilib
libjogl_cg.jnilib
libjogl.jnilib

I would like to know if I'm missing something here.
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: java.lang.NoClassDefFoundError: javax/media/opengl/GLCapabilitiesChooser

Post by Puybaret »

Since it's more realistic, I generally run the applet from a browser after running Ant applet target.
If you run it with appletviewer from Eclipse and didn't change the working directory set to classes folder by default, set VM arguments to

Code: Select all

-Djava.ext.dirs=../lib:../lib/macosx
Emmanuel Puybaret, Sweet Home 3D creator
danielfranklinr
Posts: 7
Joined: Thu Apr 05, 2012 5:14 pm
Country: Caracas, Distrito Capital, Venezuela

Re: java.lang.NoClassDefFoundError: javax/media/opengl/GLCapabilitiesChooser

Post by danielfranklinr »

Thank you very much for your help.

I applied the change you mentioned, but it gave me an error opening the default sh3d file.

However, i used the Ant file and managed to run the applet in a browser like you said.

Thanks again.
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest