X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d0ffc37686edcc803601f76ab51fdfed5fc2f241..af80677c7ebfeef12c57d427b90ce1827365a1db:/examples/java/pingPong/PingPongTest.java diff --git a/examples/java/pingPong/PingPongTest.java b/examples/java/pingPong/PingPongTest.java index 39f7d386c0..cb7ef02b6b 100644 --- a/examples/java/pingPong/PingPongTest.java +++ b/examples/java/pingPong/PingPongTest.java @@ -1,35 +1,27 @@ -/* - * Copyright (c) 2006-2013. The SimGrid Team. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the license (GNU LGPL) which comes with this package. - */ +/* Copyright (c) 2006-2014, 2016. The SimGrid Team. + * All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + package pingPong; import org.simgrid.msg.Msg; import org.simgrid.msg.NativeException; -public class PingPongTest { +public class PingPongTest { + public static void main(String[] args) throws NativeException { + Msg.init(args); + if(args.length < 2) { + Msg.info("Usage : PingPongTest platform_file deployment_file"); + Msg.info("example : PingPongTest ../platforms/platform.xml pingPongDeployment.xml"); + System.exit(1); + } - /* This only contains the launcher. If you do nothing more than than you can run - * java simgrid.msg.Msg - * which also contains such a launcher - */ + /* construct the platform and deploy the application */ + Msg.createEnvironment(args[0]); + Msg.deployApplication(args[1]); - public static void main(String[] args) throws NativeException { - /* initialize the MSG simulation. Must be done before anything else (even logging). */ - Msg.init(args); - if(args.length < 2) { - Msg.info("Usage : PingPong platform_file deployment_file"); - Msg.info("example : PingPong ping_pong_platform.xml ping_pong_deployment.xml"); - System.exit(1); - } - - /* construct the platform and deploy the application */ - Msg.createEnvironment(args[0]); - Msg.deployApplication(args[1]); - - /* execute the simulation. */ - Msg.run(); - } + /* execute the simulation. */ + Msg.run(); + } }