Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
the java samples alias0 and alias1 are renamed autoDestination and explicitDestination
[simgrid.git] / examples / java / autoDestination / AutoDestinationTest.java
1 /*\r
2  * $Id: Alias0.java 5059 2007-11-19 20:01:59Z mquinson $\r
3  *\r
4  * Copyright 2006,2007 Martin Quinson, Malek Cherier         \r
5  * All rights reserved. \r
6  *\r
7  * This program is free software; you can redistribute it and/or modify it\r
8  * under the terms of the license (GNU LGPL) which comes with this package. \r
9  */\r
10 \r
11 import simgrid.msg.*;\r
12 \r
13 public class AutoDestinationTest {\r
14    \r
15    /* This only contains the launcher. If you do nothing more than than you can run \r
16     *   java simgrid.msg.Msg\r
17     * which also contains such a launcher\r
18     */\r
19    \r
20     public static void main(String[] args) throws JniException, NativeException {\r
21        \r
22        /* initialize the MSG simulation. Must be done before anything else (even logging). */\r
23        Msg.init(args);\r
24 \r
25        if(args.length < 2) {\r
26                 \r
27           Msg.info("Usage   : Basic platform_file deployment_file");\r
28           Msg.info("example : Basic basic_platform.xml basic_deployment.xml");\r
29           System.exit(1);\r
30        }\r
31                 \r
32         /* specify a paje output file. */\r
33         Msg.pajeOutput("basic.trace");\r
34                 \r
35         /* construct the platform and deploy the application */\r
36         Msg.createEnvironment(args[0]);\r
37         Msg.deployApplication(args[1]);\r
38                 \r
39         /*  execute the simulation. */\r
40         Msg.run();\r
41     }\r
42 }\r