aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-09-24 03:25:53 +0200
committerSven Gothel <[email protected]>2011-09-24 03:25:53 +0200
commita1b4e9acb011f41698775f1fee0041e88d09613f (patch)
tree96273716e889c39bac86659ae20772eb401345d1 /src/jogl/classes
parent424a5ecbd7575eb39343638696c19cd617577912 (diff)
Use new JNILIbLoaderBase addNativeJarLibs(all, atomic) for JOGL, NativeWindow and NEWT; no more LD_LIB_.. in setenv.sh for test scripts
Diffstat (limited to 'src/jogl/classes')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLProfile.java29
1 files changed, 5 insertions, 24 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java
index f76ad5d24..1c9e9da1e 100644
--- a/src/jogl/classes/javax/media/opengl/GLProfile.java
+++ b/src/jogl/classes/javax/media/opengl/GLProfile.java
@@ -115,30 +115,11 @@ public class GLProfile {
AccessController.doPrivileged(new PrivilegedAction<Object>() {
public Object run() {
if(TempJarCache.isInitialized()) {
- final Class<?> c = GLProfile.class;
- final ClassLoader cl = c.getClassLoader();
- try {
- final String jarName = JarUtil.getJarName(c.getName(), cl);
- if(DEBUG) {
- System.err.println("GLProfile classURL: "+IOUtil.getClassURL(c.getName(), cl));
- System.err.println("GLProfile jarName: "+jarName);
- }
- if(jarName!=null) {
- if( jarName.startsWith("jogl.all") ) {
- // all-in-one variant
- JNILibLoaderBase.addNativeJarLibs(c, "jogl-all");
- } else {
- // atomic variant
- JNILibLoaderBase.addNativeJarLibs(c, "nativewindow");
- JNILibLoaderBase.addNativeJarLibs(c, "jogl");
- if( ReflectionUtil.isClassAvailable("com.jogamp.newt.NewtFactory", cl) ) {
- JNILibLoaderBase.addNativeJarLibs(c, "newt");
- }
- }
- }
- } catch (IOException ioe) {
- ioe.printStackTrace();
- }
+ String[] atomicNativeJarBaseNames = new String[] { "nativewindow", "jogl", null };
+ if( ReflectionUtil.isClassAvailable("com.jogamp.newt.NewtFactory", GLProfile.class.getClassLoader()) ) {
+ atomicNativeJarBaseNames[2] = "newt";
+ }
+ JNILibLoaderBase.addNativeJarLibs(GLProfile.class, "jogl.all", "jogl-all", atomicNativeJarBaseNames);
}
initProfilesForDefaultDevices(firstUIActionOnProcess);
return null;