Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reindent, and use default platf and deploy if none is passed
[simgrid.git] / examples / java / basic / BasicTest.java
index 89921ae..e6c6a8f 100644 (file)
@@ -19,17 +19,23 @@ public class BasicTest {
        /* initialize the MSG simulation. Must be done before anything else (even logging). */
        Msg.init(args);
 
-       if(args.length < 2) {
+       if(args.length == 0) {
+               Msg.createEnvironment("basic_platform.xml");
+               Msg.deployApplication("basic_deployment.xml");
+          
+       } else if (args.length < 2) {
+
                
          Msg.info("Usage   : Basic platform_file deployment_file");
          Msg.info("example : Basic basic_platform.xml basic_deployment.xml");
          System.exit(1);
-       }
+       } else {
                
        /* construct the platform and deploy the application */
        Msg.createEnvironment(args[0]);
        Msg.deployApplication(args[1]);
-               
+       }
+       
        /*  execute the simulation. */
         Msg.run();
     }