JOGL problem

Hi I am assisting a java project that isn’t mine and am receiving this Exception:

java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(EventQueue.java:853)
at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1257)
at innards.Launcher.doLaunch(Launcher.java:176)
at innards.Launcher.main(Launcher.java:111)
Caused by: java.lang.UnsatisfiedLinkError: JAWT_GetAWT0
at com.sun.opengl.impl.JAWTFactory.JAWT_GetAWT0(Native Method)
at com.sun.opengl.impl.JAWTFactory.JAWT_GetAWT(JAWTFactory.java:38)
at com.sun.opengl.impl.JAWT$1.run(JAWT.java:99)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.opengl.impl.JAWT.getJAWT(JAWT.java:95)
at com.sun.opengl.impl.windows.WindowsOnscreenGLDrawable.lockSurface(WindowsOnscreenGLDrawable.java:163)
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 innards.graphics.gl.TrivialGLContext.display(TrivialGLContext.java:205)

I’ve read elsewhere that this is usually from a mismatch native binary problem. I’m using jdk5R16 & I have replaced all of their jogl stuff with 1.1.1 (jogl.jar jogl.dll jogl_awt.dll) So I can’t seem to figure out what is wrong here. I have a few questions

I haven’t moved any of the bin files into my ext directory b/c I hear that’s naughty for web start applications and other reasons - is this “mismatch” between JDK & JOGL or between JOGL dlls? I’ve gotten all my binaries (i586 for windows) from the same zip file so I’d be surprised if they were mismatched… And I’ve replaced the JAR file in case this is a “mismatch” between jar & dlls. I’m also confused as to what purpose gluegen has - and why is there a gluegen-rt for windows and a gluegen.jnilib for macintosh?? (Without the -rt)

I’m doing all of this in eclipse ganymede and have included the jogl.jar in the project-preferences library but still nothing - I’ve also added the native path in the JRE environment in case it can’t find the dlls.

Also in the code are many calls to ‘loadLibrary’ - do you need to loadlibrary for gluegen-rt instead of gluegen? — I don’t see any calls to loadLibrary for gluegen… even tho it has a jar & dll.

The Installation instructions are also bogus - I see different installation instructions from different documents - some say put them in jre/lib/ext, and some say NONO b/c it breaks webstart and finally some say to keep it in the folders of the project you’re working on to reduce dep conflicts.

Last piece of info is that I’m porting this from Mac to windows so if this may provide some extra context.

Please help,
~Frustrated

If there is a JOGL version mismatch, this is usually between the jars and the dlls. Normally this is caused by some jogl related dlls lying in some system folder (e.g windows/system32) or some jogl jars in the lib/ext directory. In your case, I guess there is a wrong jogl_awt.dll somewhere. This could be because you have forgotten a version somewhere or even because a “smart” installer of some jogl app has copied it to your system in a global folder or something.

The -rt suffix in “gluegen-rt” afaik stands for “runtime”, since it is the runtime code needed to use gluegen generated bindings. I would guess the missing suffix for your jnilib is just a glitch, so don’t bother.

I would advice to make a global system search for jogl*.* and gluegen*.* and remove anything you find. After that download the zip distribution again from here https://jogl.dev.java.net/servlets/ProjectDocumentList?folderID=9260&expandFolder=9260&folderID=8767 (I think you have to pay attention to either get the 32 or the 64 bit version in respect to your JDK, not your OS) and unzip it to a dedicated folder (mine is D:\development\libs\jogl). After that use this small tutorial, to make it work in eclipse: http://splainhow.com/jogl_eclipse.html