We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I successfully built a Processing Applet in Eclipse but when I try with OpenGL it fails to find some library.
I just pasted in all the libraries on the premise that one of them would contain the OpenGL library, but obviously not. What libraries must be added, and where are they?
Here are all the libraries that are included
core.jar
gluegen-rt-natives-linux-i586.jar
gluegen-rt-natives-windows-amd64.jar
gluegen-rt-natives-windows-i586.jar
gluegen-rt.jar
jogl-all-natives-linux-i586.jar
jogl-all-natives-windows-amd64.jar
jogl-all-natives-windows-i586.jar
jogl-all.jar
Here is the exception generated:
java.lang.NoClassDefFoundError: javax/media/opengl/GLException
at processing.opengl.PGraphicsOpenGL.createPGL(PGraphicsOpenGL.java:1716)
at processing.opengl.PGraphicsOpenGL.<init>(PGraphicsOpenGL.java:518)
at processing.opengl.PGraphics3D.<init>(PGraphics3D.java:37)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at processing.core.PApplet.makeGraphics(PApplet.java:1840)
Answers
You need to add the libraries to the build path. In Eclipse right-click on the project folder and select
Build Path > Config Build Path
from the popup menu. Select theLibraries
tab then clickAdd External JARS...
navigate to the folder and add the ALL the opengl jars