Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Have some mpich3 tests use the automatic privatization instead of manual one.
[simgrid.git] / src / bindings / java / org / simgrid / msg / NativeLib.java
1 package org.simgrid.msg;
2
3 public final class NativeLib {
4     public static String getPath() {
5         String prefix = "NATIVE";
6         String os = System.getProperty("os.name");
7         String arch = System.getProperty("os.arch");
8
9         if (os.toLowerCase().startsWith("^win"))
10             os = "Windows";
11         else if (os.contains("OS X"))
12             os = "Darwin";
13
14         if (arch.matches("^i[3-6]86$"))
15             arch = "x86";
16         else if (arch.equalsIgnoreCase("amd64"))
17             arch = "x86_64";
18
19         os = os.replace(' ', '_');
20         arch = arch.replace(' ', '_');
21
22         return prefix + "/" + os + "/" + arch + "/";
23     }
24
25     public static void main(String[] args) {
26         System.out.println(getPath());
27     }
28 }