diff options
Diffstat (limited to 'make/cg-common.cfg')
-rw-r--r-- | make/cg-common.cfg | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/make/cg-common.cfg b/make/cg-common.cfg index 315dda214..906fbbf09 100644 --- a/make/cg-common.cfg +++ b/make/cg-common.cfg @@ -72,11 +72,15 @@ CustomCCode #include <Cg/cgGL.h> CustomJavaCode CgGL static { CustomJavaCode CgGL AccessController.doPrivileged(new PrivilegedAction() { CustomJavaCode CgGL public Object run() { -CustomJavaCode CgGL // Workaround so that these don't need to be in the system -CustomJavaCode CgGL // path but can be referenced from java.library.path -CustomJavaCode CgGL // (this is intended to help with Webstarted applications) -CustomJavaCode CgGL System.loadLibrary("cg"); -CustomJavaCode CgGL System.loadLibrary("cgGL"); +CustomJavaCode CgGL try { +CustomJavaCode CgGL // Workaround so that these don't need to be in the system +CustomJavaCode CgGL // path but can be referenced from java.library.path +CustomJavaCode CgGL // (this is intended to help with Webstarted applications) +CustomJavaCode CgGL System.loadLibrary("cg"); +CustomJavaCode CgGL System.loadLibrary("cgGL"); +CustomJavaCode CgGL } catch (UnsatisfiedLinkError e) { +CustomJavaCode CgGL // Consider this non-fatal +CustomJavaCode CgGL } CustomJavaCode CgGL // Load the actual Cg binding CustomJavaCode CgGL System.loadLibrary("jogl_cg"); CustomJavaCode CgGL return null; |