From: Martin Quinson Date: Thu, 24 Sep 2015 23:10:56 +0000 (+0200) Subject: Be verbose about errors encountered X-Git-Tag: v3_12~123 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/ed44e06dc7c486a766648b3e635a742f82037865 Be verbose about errors encountered --- diff --git a/src/bindings/java/org/simgrid/NativeLib.java b/src/bindings/java/org/simgrid/NativeLib.java index 0fdf5fcb95..f3102c09a7 100644 --- a/src/bindings/java/org/simgrid/NativeLib.java +++ b/src/bindings/java/org/simgrid/NativeLib.java @@ -60,19 +60,19 @@ public final class NativeLib { if (in == null) { filename = "lib"+name+".so"; in = NativeLib.class.getClassLoader().getResourceAsStream(Path+filename); - } + } if (in == null) { filename = name+".dll"; in = NativeLib.class.getClassLoader().getResourceAsStream(Path+filename); - } + } if (in == null) { filename = "lib"+name+".dll"; in = NativeLib.class.getClassLoader().getResourceAsStream(Path+filename); - } + } if (in == null) { filename = "lib"+name+".dylib"; in = NativeLib.class.getClassLoader().getResourceAsStream(Path+filename); - } + } if (in == null) { throw new SimGridLibNotFoundException("Cannot find library "+name+" in path "+Path+". Sorry, but this jar does not seem to be usable on your machine."); } @@ -94,8 +94,9 @@ public final class NativeLib { in.close(); out.close(); System.load(fileOut.getAbsolutePath()); - } catch (Exception e) { + System.err.println("Error while extracting the native library from the jar: "); + e.printStackTrace(); throw new SimGridLibNotFoundException("Cannot load the bindings to the "+name+" library in path "+getPath(), e); } }