Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[java] unpack dll/so to a tempDir instead of messing with their name
[simgrid.git] / src / bindings / java / org / simgrid / msg / Msg.java
index 6cdc894..b324db8 100644 (file)
@@ -9,26 +9,8 @@
 package org.simgrid.msg;
 import org.simgrid.NativeLib;
 
-import java.io.FileOutputStream;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.File;
-
 
 public final class Msg {
-       /* Statically load the library which contains all native functions used in here */
-       static private boolean isNativeInited = false;
-       public static void nativeInit() {
-               if (isNativeInited)
-                       return;
-               NativeLib.nativeInit("simgrid");
-               NativeLib.nativeInit("simgrid-java");      
-               isNativeInited = true;
-       }
-
-       static {
-               nativeInit();
-       }
 
        /** Retrieve the simulation time
         * @return The simulation time.
@@ -127,4 +109,9 @@ public final class Msg {
                /* Execute the simulation */
                Msg.run();
        }
+       
+       /* Class initializer, to initialize various JNI stuff */
+       static {
+               org.simgrid.NativeLib.nativeInit();
+       }
 }