*/
public static native void nativeInit();
static {
+ Msg.nativeInit();
nativeInit();
}
}
*/
public static native void nativeInit();
static {
+ Msg.nativeInit();
nativeInit();
}
}
\ No newline at end of file
public final class Msg {
/* Statically load the library which contains all native functions used in here */
- static {
+ static private boolean isNativeInited = false;
+ public static void nativeInit() {
+ if (isNativeInited)
+ return;
try {
/* prefer the version on disk, if existing */
System.loadLibrary("SG_java");
loadLib("simgrid");
loadLib("SG_java");
}
+ isNativeInited = true;
+ }
+ static {
+ nativeInit();
}
private static void loadLib (String name) {
String Path = "NATIVE/"+System.getProperty("os.name")+"/"+System.getProperty("os.arch")+"/";
*/
public static native void nativeInit();
static {
+ Msg.nativeInit();
nativeInit();
}
}
package org.simgrid.msg;
import java.util.Arrays;
-import java.util.Hashtable;
import java.util.Vector;
-import java.lang.Runnable;
-import java.util.concurrent.Semaphore;
/**
* A process may be defined as a code, with some private data, executing
*/
public static native void nativeInit();
static {
+ Msg.nativeInit();
nativeInit();
}
/**
*/
public static native void nativeInit();
static {
+ Msg.nativeInit();
nativeInit();
}
}
\ No newline at end of file
*/
public static native void nativeInit();
static {
+ Msg.nativeInit();
nativeInit();
}
}
public final class Trace {
/* Statically load the library which contains all native functions used in here */
static {
+ Msg.nativeInit();
try {
System.loadLibrary("SG_java_tracing");
} catch(UnsatisfiedLinkError e) {