From a1b4e9acb011f41698775f1fee0041e88d09613f Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 24 Sep 2011 03:25:53 +0200 Subject: Use new JNILIbLoaderBase addNativeJarLibs(all, atomic) for JOGL, NativeWindow and NEWT; no more LD_LIB_.. in setenv.sh for test scripts --- src/jogl/classes/javax/media/opengl/GLProfile.java | 29 ++++------------------ 1 file changed, 5 insertions(+), 24 deletions(-) (limited to 'src/jogl/classes/javax/media/opengl/GLProfile.java') 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() { 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; -- cgit v1.2.3