From: Augustin Degomme Date: Tue, 19 Feb 2013 16:24:33 +0000 (+0100) Subject: Java didn't report the same OS name as Cmake for Windows platform, force it to be... X-Git-Tag: v3_9_90~486 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/0866d02c77b47ffa77be8e7092ac085fbf12ac40?ds=sidebyside Java didn't report the same OS name as Cmake for Windows platform, force it to be "Windows" --- diff --git a/src/bindings/java/org/simgrid/msg/Msg.java b/src/bindings/java/org/simgrid/msg/Msg.java index e6938fbf27..3ec72e827e 100644 --- a/src/bindings/java/org/simgrid/msg/Msg.java +++ b/src/bindings/java/org/simgrid/msg/Msg.java @@ -37,7 +37,12 @@ public final class Msg { nativeInit(); } private static void loadLib (String name) { - String Path = "NATIVE/"+System.getProperty("os.name")+"/"+System.getProperty("os.arch")+"/"; + String Os = System.getProperty("os.name"); + //Windows may report its name in java differently from cmake, which generated the path + if(Os.toLowerCase().indexOf("win") >= 0) Os = "Windows"; + String Path = "NATIVE/"+Os+"/"+System.getProperty("os.arch")+"/"; + System.out.println("loading from " +Path); + String filename=name; InputStream in = Msg.class.getClassLoader().getResourceAsStream(Path+filename);