From: Martin Quinson Date: Tue, 12 Apr 2016 20:16:58 +0000 (+0200) Subject: also provide an informative error message when Java is missing boost-context X-Git-Tag: v3_13~97^2~6 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/57cafb63a6c0bbcb21cb3d9a72ad3219de18b971?ds=sidebyside also provide an informative error message when Java is missing boost-context --- diff --git a/src/bindings/java/org/simgrid/NativeLib.java b/src/bindings/java/org/simgrid/NativeLib.java index de5d17c7c0..4af8a637d9 100644 --- a/src/bindings/java/org/simgrid/NativeLib.java +++ b/src/bindings/java/org/simgrid/NativeLib.java @@ -41,10 +41,16 @@ public final class NativeLib { System.err.println("\nCannot load the bindings to the "+name+" library in path "+getPath()); Throwable cause = embeededException.getCause(); - if (cause instanceof java.lang.UnsatisfiedLinkError && cause.getMessage().matches(".*libcgraph.so.*")) - System.err.println("HINT: Try to install the libcgraph package (sudo apt-get install libcgraph)."); - else + if (cause instanceof java.lang.UnsatisfiedLinkError) { + if (cause.getMessage().matches(".*libcgraph.so.*")) + System.err.println("HINT: Try to install the libcgraph package (sudo apt-get install libcgraph)."); + else if (cause.getMessage().matches(".*libboost_context.so.*")) + System.err.println("HINT: Try to install the boost-context package (sudo apt-get install libboost-context-dev)."); + else + System.err.println("Try to install the missing dependencies, which name should appear above."); + } else { System.err.println("This jar file does not seem to fit your system, and no usable SimGrid installation found on disk."); + } System.err.println(); cause.printStackTrace(); System.exit(1);