diff options
Diffstat (limited to 'make')
-rwxr-xr-x | make/cg-common-CustomJavaCode.java | 17 | ||||
-rw-r--r-- | make/cg-common.cfg | 4 |
2 files changed, 3 insertions, 18 deletions
diff --git a/make/cg-common-CustomJavaCode.java b/make/cg-common-CustomJavaCode.java index ba0df4ee9..63afdb65d 100755 --- a/make/cg-common-CustomJavaCode.java +++ b/make/cg-common-CustomJavaCode.java @@ -1,20 +1,5 @@ static { - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - try { - // Workaround so that these don't need to be in the system - // path but can be referenced from java.library.path - // (this is intended to help with Webstarted applications) - System.loadLibrary("cg"); - System.loadLibrary("cgGL"); - } catch (UnsatisfiedLinkError e) { - // Consider this non-fatal - } - // Load the actual Cg binding - System.loadLibrary("jogl_cg"); - return null; - } - }); + NativeLibLoader.loadCgImpl(); } /** A convenience method which reads all available data from the InputStream and then calls cgCreateProgram. */ diff --git a/make/cg-common.cfg b/make/cg-common.cfg index f264fb2bf..6f73e7ed0 100644 --- a/make/cg-common.cfg +++ b/make/cg-common.cfg @@ -96,8 +96,8 @@ Ignore cgGetProgramOptions # Need to import New IO for Buffer classes # Import java.nio.* -# and java.security.* to allow unsigned Cg applications -Import java.security.* +# And NativeLibLoader for help loading the native libraries +Import com.sun.opengl.impl.* # Raise CgException instead of RuntimeException in glue code RuntimeExceptionType CgException |