X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ded03b0cabab3a00539bc4ab75cad2b31df46932..5873e2ce9c66711a168e9b419f0d1b6384ce1ffa:/src/java/simgrid/msg/Msg.java diff --git a/src/java/simgrid/msg/Msg.java b/src/java/simgrid/msg/Msg.java index 00384e7937..766692695c 100644 --- a/src/java/simgrid/msg/Msg.java +++ b/src/java/simgrid/msg/Msg.java @@ -83,9 +83,15 @@ public final class Msg { */ static { try { - System.loadLibrary("simgrid4java"); + System.loadLibrary("simgrid"); + Msg.selectContextFactory("jcontext_factory"); + } catch(NativeException e) + { + System.err.println(e.toString()); + e.printStackTrace(); + System.exit(1); } catch(UnsatisfiedLinkError e){ - System.err.println("Cannot load simgrid4java library : "); + System.err.println("Cannot load simgrid library : "); e.printStackTrace(); System.err.println("Please check your LD_LIBRARY_PATH, "+ "or copy the library to the current directory"); @@ -93,6 +99,9 @@ public final class Msg { } } + final static native + void selectContextFactory(String name) throws NativeException; + /****************************************************************** * The natively implemented methods connected to the MSG Process * ******************************************************************/