Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'mc++' into mc-merge
[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
7 package cloud.migration;
8
9 import org.simgrid.msg.Host;
10 import org.simgrid.msg.HostNotFoundException;
11 import org.simgrid.msg.Msg;
12 import org.simgrid.msg.NativeException;
13
14 public class Main {
15     private static boolean endOfTest = false;
16
17     public static void setEndOfTest(){
18         endOfTest=true;
19     }
20
21     public static boolean isEndOfTest(){
22         return endOfTest;
23     }
24
25     public static void main(String[] args) throws NativeException {
26        /* Init. internal values */
27         Msg.init(args);
28
29         if (args.length < 2) {
30             Msg.info("Usage  : Main platform_file.xml dployment_file.xml");
31             System.exit(1);
32         }
33
34        /* construct the platform and deploy the application */
35         Msg.createEnvironment(args[0]);
36         Msg.deployApplication(args[1]);
37
38         Msg.run();
39
40
41     }
42 }