Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix doxygen comments.
[simgrid.git] / examples / java / bittorrent / Bittorrent.java
1 /**
2 * Copyright 2012 The SimGrid team. All right reserved. 
3 *
4 * This program is free software; you can redistribute 
5 * it and/or modify it under the terms of the license 
6 * (GNU LGPL) which comes with this package.
7 *
8 */
9 package bittorrent;
10
11 import org.simgrid.msg.Msg;
12 import org.simgrid.msg.MsgException;
13
14 public class Bittorrent {
15         public static void main(String[] args) throws MsgException {
16                 /* initialize the MSG simulation. Must be done before anything else (even logging). */
17                 Msg.init(args);
18         if(args.length < 2) {
19                 Msg.info("Usage   : Bittorrent platform_file deployment_file");
20                 Msg.info("example : Bittorrent platform.xml deployment.xml");
21                 System.exit(1);
22         }
23                 
24                 /* construct the platform and deploy the application */
25                 Msg.createEnvironment(args[0]);
26                 Msg.deployApplication(args[1]);
27                         
28                 /*  execute the simulation. */
29         Msg.run();              
30         }
31
32 }