Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Force windows jar to bundle into x86, as we only build/support 32 bits version
[simgrid.git] / src / bindings / java / org / simgrid / NativeLib.java
index 130c904..5d6a1bc 100644 (file)
@@ -1,3 +1,9 @@
+/* Copyright (c) 2014. The SimGrid Team.
+ * All rights reserved.                                                     */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
 package org.simgrid;
 
 import java.io.FileOutputStream;
@@ -12,16 +18,17 @@ public final class NativeLib {
         String os = System.getProperty("os.name");
         String arch = System.getProperty("os.arch");
 
-        if (os.toLowerCase().startsWith("^win"))
-            os = "Windows";
-        else if (os.contains("OS X"))
-            os = "Darwin";
-
         if (arch.matches("^i[3-6]86$"))
             arch = "x86";
         else if (arch.equalsIgnoreCase("amd64"))
             arch = "x86_64";
 
+        if (os.toLowerCase().startsWith("^win")){
+            os = "Windows";
+            arch = "x86";
+        }else if (os.contains("OS X"))
+            os = "Darwin";
+
         os = os.replace(' ', '_');
         arch = arch.replace(' ', '_');