diff options
author | Sven Gothel <[email protected]> | 2011-12-18 16:08:15 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-12-18 16:08:15 +0100 |
commit | 791dacb29bcd6d7ed161c6bd2abf7937c7d00691 (patch) | |
tree | d2a15e072e80dc8af7950834eb90637a58dedea8 /src/java | |
parent | f20389b3f59c5d8c6d9afe0df16282dd09115640 (diff) |
JNILibLoaderBaser.addNativeJarLibs(..): Catch all Exception (also IllegalArgumentException) - solves case using plain class instead of JAR file
Diffstat (limited to 'src/java')
-rw-r--r-- | src/java/com/jogamp/common/jvm/JNILibLoaderBase.java | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java b/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java index a2bb859..fd12b7f 100644 --- a/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java +++ b/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java @@ -39,14 +39,12 @@ package com.jogamp.common.jvm; -import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.net.URL; import java.security.AccessController; import java.security.AccessControlContext; import java.util.HashSet; -import java.util.jar.JarFile; import com.jogamp.common.os.Platform; import com.jogamp.common.util.JarUtil; @@ -161,10 +159,12 @@ public class JNILibLoaderBase { } TempJarCache.addNativeLibs(classFromJavaJar, nativeJarURL, cl); return true; - } catch (IOException ioe) { - ioe.printStackTrace(); } catch (Exception e0) { - e0.printStackTrace(); + // IllegalArgumentException, IOException + System.err.println("Catched: "+e0.getMessage()); + if(DEBUG) { + e0.printStackTrace(); + } } } return false; @@ -199,8 +199,12 @@ public class JNILibLoaderBase { } } } - } catch (IOException ioe) { - ioe.printStackTrace(); + } catch (Exception e0) { + // IllegalArgumentException, IOException + System.err.println("Catched: "+e0.getMessage()); + if(DEBUG) { + e0.printStackTrace(); + } } } return res; |