Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'mc' into mc++
[simgrid.git] / src / bindings / java / org / simgrid / msg / Msg.java
index 895fadf..108c7b5 100644 (file)
@@ -1,13 +1,10 @@
-/*
- * JNI interface to C code for MSG.
- * 
- * Copyright 2006-2012 The SimGrid Team.           
- * All right 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.
- */
+/* JNI interface to C code for MSG. */
+
+/* Copyright (c) 2006-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.msg;
 
@@ -25,11 +22,11 @@ public final class Msg {
                        return;
                try {
                        /* prefer the version on disk, if existing */
-                       System.loadLibrary("SG_java");
+                       System.loadLibrary("simgrid-java");
                } catch (UnsatisfiedLinkError e) {
                        /* If not found, unpack the one bundled into the jar file and use it */
                        loadLib("simgrid");
-                       loadLib("SG_java");
+                       loadLib("simgrid-java");
                }
                isNativeInited = true;
        }
@@ -37,7 +34,8 @@ public final class Msg {
                nativeInit();
        }
        private static void loadLib (String name) {
-               String Path = "NATIVE/"+System.getProperty("os.name")+"/"+System.getProperty("os.arch")+"/";
+               String Path = NativeLib.getPath();
+
                String filename=name;
                InputStream in = Msg.class.getClassLoader().getResourceAsStream(Path+filename);
                
@@ -112,7 +110,7 @@ public final class Msg {
        }
 
     /** Retrieve the simulation time
-     * @return
+     * @return The simulation time.
      */
        public final static native double getClock();
        /**
@@ -154,8 +152,6 @@ public final class Msg {
         * 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);
 
@@ -166,8 +162,6 @@ public final class Msg {
         * {@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() ;
        
@@ -183,6 +177,8 @@ public final class Msg {
         */
        public final static native void createEnvironment(String platformFile);
 
+       public final static native As environmentGetRoutingRoot();
+
        /**
         * The method to deploy the simulation.
         *