Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
define a process package in examples/java
[simgrid.git] / examples / java / process / suspend / Main.java
1 /* Copyright (c) 2006-2014, 2016. 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   public static void main(String[] args) {
13     Msg.init(args);
14     if(args.length < 1) {
15       Msg.info("Usage   : Suspend platform_file");
16       Msg.info("example : Suspend ../platforms/platform.xml");
17       System.exit(1);
18     }
19     /* construct the platform and deploy the application */
20     Msg.createEnvironment(args[0]);
21     try {
22         DreamMaster process1 = new DreamMaster("Jacquelin","DreamMaster");
23         process1.start();
24       } catch (MsgException e){
25         System.out.println("Create processes failed!");
26       }
27
28     /*  execute the simulation. */
29     Msg.run();
30   }
31 }