nativeInit();
}
private static void loadLib (String name) {
- String Path = "NATIVE/"+System.getProperty("os.name")+"/"+System.getProperty("os.arch")+"/";
+ String Os = System.getProperty("os.name");
+ String Arch = System.getProperty("os.arch");
+ // Some OS/Arch may be different between Java and Cmake,
+ // which generated the path
+ if (Os.toLowerCase().startsWith("win"))
+ Os = "Windows";
+ else if (Os.contains("OS X"))
+ Os = "Darwin";
+ if (Arch.equalsIgnoreCase("x86"))
+ Arch = "i386";
+ else if (Arch.equalsIgnoreCase("x86_64"))
+ Arch = "amd64";
+ String Path = "NATIVE/" + Os + "/" + Arch + "/";
+
String filename=name;
InputStream in = Msg.class.getClassLoader().getResourceAsStream(Path+filename);
}
/** Retrieve the simulation time
- * @return
+ * @return The simulation time.
*/
public final static native double getClock();
/**
* The natively implemented method to initialize a MSG simulation.
*
* @param args The arguments of the command line of the simulation.
- *
- * @see Msg.init()
*/
public final static native void init(String[]args);
* {@link #clean()} if you really insist on cleaning the C side), so you can freely
* retrieve the informations that you want from the simulation. In particular, retrieving the status
* of a process or the current date is perfectly ok.
- *
- * @see MSG_run
*/
public final static native void run() ;