Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
68b19aca9e5904dbccbc370f21d1bd64b7272169
[simgrid.git] / examples / java / cloud / migration / Main.java
1 /* Copyright (c) 2014. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6 package cloud.migration;
7
8 import org.simgrid.msg.Host;
9 import org.simgrid.msg.HostNotFoundException;
10 import org.simgrid.msg.Msg;
11 import org.simgrid.msg.NativeException;
12
13 public class Main {
14     private static boolean endOfTest = false;
15
16     public static void setEndOfTest(){
17         endOfTest=true;
18     }
19
20     public static boolean isEndOfTest(){
21         return endOfTest;
22     }
23
24     public static void main(String[] args) throws NativeException {
25        /* Init. internal values */
26         Msg.init(args);
27
28         if (args.length < 2) {
29             Msg.info("Usage  : Main platform_file.xml dployment_file.xml");
30             System.exit(1);
31         }
32
33        /* construct the platform and deploy the application */
34         Msg.createEnvironment(args[0]);
35         Msg.deployApplication(args[1]);
36
37         Msg.run();
38
39
40     }
41 }