X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/517c8af545eefa8baf9a5439f242a4bd021f9085..77d095374d3f966ce0f54f3837116c73bc3e52e4:/src/bindings/java/org/simgrid/NativeLib.java diff --git a/src/bindings/java/org/simgrid/NativeLib.java b/src/bindings/java/org/simgrid/NativeLib.java index 61b4606b53..7c08bc267b 100644 --- a/src/bindings/java/org/simgrid/NativeLib.java +++ b/src/bindings/java/org/simgrid/NativeLib.java @@ -20,11 +20,13 @@ public final class NativeLib { if (isNativeInited) return; - //if (System.getProperty("os.name").toLowerCase().startsWith("win")) - // NativeLib.nativeInit("winpthread-1"); + if (System.getProperty("os.name").toLowerCase().startsWith("win")) + NativeLib.nativeInit("winpthread-1"); + try { + NativeLib.nativeInit("boost_context"); + } catch (Exception e) {/* Dont care */} NativeLib.nativeInit("simgrid"); - NativeLib.nativeInit("surf-java"); NativeLib.nativeInit("simgrid-java"); isNativeInited = true; } @@ -38,15 +40,18 @@ public final class NativeLib { try { System.loadLibrary(name); } catch (UnsatisfiedLinkError e2) { - System.err.println("Cannot load the bindings to the "+name+" library in path "+getPath()); - e.printStackTrace(); - System.err.println("This jar file does not seem to fit your system, and I cannot find an installation of SimGrid."); - System.exit(1); + if (! name.equals("boost_context")) { + System.err.println("Cannot load the bindings to the "+name+" library in path "+getPath()); + e.printStackTrace(); + System.err.println("This jar file does not seem to fit your system, and I cannot find an installation of SimGrid."); + System.exit(1); + } } } } public static String getPath() { + // Inspiration: https://github.com/xerial/snappy-java/blob/develop/src/main/java/org/xerial/snappy/OSInfo.java String prefix = "NATIVE"; String os = System.getProperty("os.name"); String arch = System.getProperty("os.arch");