Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add kademlia example
[simgrid.git] / examples / startKillTime / StartKillTime.java
1 /* Copyright (c) 2007, 2009, 2010, 2012. 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 package startKillTime;
7 import org.simgrid.msg.Msg;
8 import org.simgrid.msg.NativeException;
9  
10 public class StartKillTime  {
11
12    /* This only contains the launcher. If you do nothing more than than you can run 
13     *   java org.simgrid.msg.Msg
14     * which also contains such a launcher
15     */
16     
17     public static void main(String[] args) throws NativeException {     
18                 /* initialize the MSG simulation. Must be done before anything else (even logging). */
19                 Msg.init(args);
20                 if(args.length < 2) {
21                         Msg.info("Usage   : StartKilltime platform_file deployment_file");
22                 Msg.info("example : StartKilltime platform.xml startKilltime.xml");
23                 System.exit(1);
24                 }
25         
26                 /* construct the platform and deploy the application */
27                 Msg.createEnvironment(args[0]);
28                 Msg.deployApplication(args[1]);
29                 
30                 /*  execute the simulation. */
31             Msg.run();
32     }
33 }