aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes
diff options
context:
space:
mode:
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;