From 791dacb29bcd6d7ed161c6bd2abf7937c7d00691 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 18 Dec 2011 16:08:15 +0100 Subject: JNILibLoaderBaser.addNativeJarLibs(..): Catch all Exception (also IllegalArgumentException) - solves case using plain class instead of JAR file --- src/java/com/jogamp/common/jvm/JNILibLoaderBase.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src/java/com/jogamp/common/jvm') 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; -- cgit v1.2.3