Jogl and Eclipse

Hi,
I have Windows XP and use Eclipse and Java 6.0. When I installed jogl of the year 2003 and tested some old demos, only referencing to the jogl jar, it worked fine. For the newer demos, I installed jogl 1.1.0. But at Eclipse, I got the following exception testing the jogl gears demo:


Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: com.sun.opengl.impl.windows.WGL.GetPixelFormat(J)I
	at com.sun.opengl.impl.windows.WGL.GetPixelFormat(Native Method)
	at com.sun.opengl.impl.windows.WindowsGLDrawable.choosePixelFormat(WindowsGLDrawable.java:82)
	at com.sun.opengl.impl.windows.WindowsOnscreenGLDrawable.lockSurface(WindowsOnscreenGLDrawable.java:203)
	at com.sun.opengl.impl.windows.WindowsOnscreenGLContext.makeCurrentImpl(WindowsOnscreenGLContext.java:57)
	at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:134)
	at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:182)
	at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:265)
	at javax.media.opengl.GLCanvas.display(GLCanvas.java:130)
	at javax.media.opengl.GLCanvas.paint(GLCanvas.java:142)
	at sun.awt.RepaintArea.paintComponent(Unknown Source)
	at sun.awt.RepaintArea.paint(Unknown Source)
	at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

Copying the dlls @ WINDOWS/system32 did not help. Do you know what’s wrong and what’s to do?

Best,
Andreas

Please do not copy the dlls to somewhere global on your system and don’t copy the jars to your JREs ext directory like many tutorials unfortunately suggest. This can lead to strange problems (e.g. the error-message you’ve got :slight_smile: ) and might break webstart of JOGL based applications.

Find and remove all occurences of jogl/gluegen jars/dlls and follow this tutorial:
http://splainhow.com/jogl_eclipse.html

Just unpack the archive somewhere like C:\development\libs\jogl and setup the right references in the eclipse project.

Edit:
The tutorial forgot to mention that you also need to add the gluegen-rt.jar to your projects libraries.

Hi,
I deleted the dlls and jars and linked the dlls as described. Now, it’s working. Thank you!

Andreas