Okay… I think I tracked the problem down. Of course all this doesn’t have anything at all to do with texturing… ~
if (osType != MAC_OS) { // borrowed from NativeLibLoader
try {
System.loadLibrary("jawt");
System.out.println("jawt loaded");
} catch (UnsatisfiedLinkError ex) {
// Accessibility technologies load JAWT themselves; safe to continue
// as long as JAWT is loaded by any loader
if (ex.getMessage().indexOf("already loaded") == -1) {
displayError("Unabled to load JAWT");
throw ex;
}
}
}
// static linking
try {
System.load(nativeLib.getPath());
System.out.println("Jogl loaded from jar");
} catch (UnsatisfiedLinkError ex) {
// should be safe to continue as long as the native is loaded by any loader
if (ex.getMessage().indexOf("already loaded") == -1) {
displayError("Unable to load " + nativeLib.getName());
throw ex;
}
}
// disable JOGL loading form elsewhere
com.sun.opengl.impl.NativeLibLoader.disableLoading();
This code loads the jawt and jogl from the jar it just uploaded to the target machine, then disables any further automatic library loading (last line). If I comment this last line, then netbean’s applet viewer will run the applet fine, by loading my dev. copy of jogl pointed to by the classpath. If I sign the jar and stuff and try to load it as it is on a machine without jogl in the class path, the jvm gets pissed. If I leave the disableLoading() directive there to do its job, then the applet will load, but then this error will be thrown:
Exception in thread "AWT-EventQueue-1" 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:128)
at com.sun.opengl.impl.windows.WindowsOnscreenGLContext.makeCurrentImpl(WindowsOnscreenGLContext.java:58)
at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:74)
at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:117)
at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:236)
at javax.media.opengl.GLCanvas.display(GLCanvas.java:127)
at javax.media.opengl.GLCanvas.paint(GLCanvas.java:139)
at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)
at sun.awt.RepaintArea.paint(RepaintArea.java:224)
at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:254)
at java.awt.Component.dispatchEventImpl(Component.java:4031)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
This didnt happen with older builds of jogl, I think the jvm was happy enough with the manual loading of jawt and jogl. Not anymore now, anyone know if I need to manually load anything else to make this work?
Thanks.