Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / teshsuite / java / sleep_host_off / Main.java
1 package sleep_host_off;
2
3 import org.simgrid.msg.Host;
4 import org.simgrid.msg.HostNotFoundException;
5 import org.simgrid.msg.Msg;
6 import org.simgrid.msg.NativeException;
7
8 public class Main {
9
10     public static void main(String[] args) throws NativeException {
11        /* Init. internal values */
12         Msg.init(args);
13
14         if (args.length < 2) {
15             Msg.info("Usage  : Main platform_file.xml dployment_file.xml");
16             System.exit(1);
17         }
18
19        /* construct the platform and deploy the application */
20         Msg.createEnvironment(args[0]);
21         Msg.deployApplication(args[1]);
22
23         try {
24             Msg.run();
25         } catch (Exception e){
26             System.out.println("Bye bye the program crashes !");
27         }
28
29     }
30 }