From 5a67c0f5302dbd445d744450db58d1122096b742 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Sun, 2 Dec 2001 19:45:01 +0000 Subject: Fixed run-time link problems with JAWT --- gl4java/GLContext.java.skel | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gl4java/GLContext.java.skel b/gl4java/GLContext.java.skel index 50aa7c3..5ded66d 100644 --- a/gl4java/GLContext.java.skel +++ b/gl4java/GLContext.java.skel @@ -812,6 +812,20 @@ public class GLContext extends Object AccessController.doPrivileged(new PrivilegedAction() { public Object run() { + /* Try to load jawt.dll ahead of time to prevent + problems on Sun JDK 1.3 and greater. Loading the + version of the native library which uses JAWT + causes run-time link errors if jre/lib/ or + jre/bin are not in $PATH. A more clean solution + might be to explicitly look up the JAWT functions, + but that would require looking up the full path to + libjawt.so/jawt.dll, which is a pain as it's + automatically done by the JDK's libraries. */ + try { + System.loadLibrary("jawt"); + } catch (UnsatisfiedLinkError e) { + } + /* load libs */ int libNumber = 0; String _libName = null ; -- cgit v1.2.3