Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : comment erroneous ignore (not completely sure ...)
[simgrid.git] / examples / java / kademlia / Kademlia.java
1 /* Copyright (c) 2012-2014. 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 kademlia;
8 import org.simgrid.msg.Msg;
9 import org.simgrid.msg.MsgException;
10 /**
11  * Main class of the simulation. Launch the simulation.
12  */
13 public class Kademlia {
14         public static void main(String[] args) throws MsgException {
15                 /* initialize the MSG simulation. Must be done before anything else (even logging). */
16                 Msg.init(args);
17                 if(args.length < 2) {
18                         Msg.info("Usage   : Kademlia platform_file deployment_file");
19                         Msg.info("example : Kademlia platform.xml deployment.xml");
20                         System.exit(1);
21                 }
22                 
23                 /* construct the platform and deploy the application */
24                 Msg.createEnvironment(args[0]);
25                 Msg.deployApplication(args[1]);
26                         
27                 /*  execute the simulation. */
28         Msg.run();              
29         }
30 }