Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cce0555d354aea0d6b6a566ba29eb061be9e3990
[simgrid.git] / examples / java / app / pingpong / 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 app.pingpong;
8 import org.simgrid.msg.Msg;
9 import org.simgrid.msg.MsgException;
10 import org.simgrid.msg.NativeException;
11  
12 public class Main {
13   public static void main(String[] args) throws MsgException, NativeException{
14     Msg.init(args);
15     if(args.length < 1) {
16       Msg.info("Usage   : Main platform_file");
17       Msg.info("example : Main ../platforms/platform.xml");
18       System.exit(1);
19     }
20
21     Msg.createEnvironment(args[0]);
22     new Sender("Jacquelin", "Sender", new String[] {"Boivin"}).start();
23     new Receiver ("Boivin", "Receiver", null).start();
24
25     Msg.run();
26   }
27 }