Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
2666c9a2eae4680d969cf9012c0932f33f61f1ea
[simgrid.git] / examples / java / process / suspend / Main.java
1 /* Copyright (c) 2006-2018. 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 process.suspend;
8 import org.simgrid.msg.Msg;
9 import org.simgrid.msg.MsgException;
10
11 public class Main {
12   private Main() {
13     throw new IllegalAccessError("Utility class");
14   }
15
16   public static void main(String[] args) {
17     Msg.init(args);
18     if(args.length < 1) {
19       Msg.info("Usage   : Suspend platform_file");
20       Msg.info("example : Suspend ../platforms/platform.xml");
21       System.exit(1);
22     }
23     /* construct the platform and deploy the application */
24     Msg.createEnvironment(args[0]);
25     try {
26         DreamMaster process1 = new DreamMaster("Jacquelin","DreamMaster");
27         process1.start();
28     } catch (MsgException e){
29       Msg.error("Create processes failed!");
30     }
31
32     /*  execute the simulation. */
33     Msg.run();
34   }
35 }