A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pingPong -> app/pingpong
[simgrid.git]
/
examples
/
java
/
app
/
pingpong
/
Main.java
diff --git
a/examples/java/pingPong/PingPongTest.java
b/examples/java/app/pingpong/Main.java
similarity index 51%
rename from
examples/java/pingPong/PingPongTest.java
rename to
examples/java/app/pingpong/Main.java
index
cb7ef02
..
cce0555
100644
(file)
--- a/
examples/java/pingPong/PingPongTest.java
+++ b/
examples/java/app/pingpong/Main.java
@@
-4,24
+4,24
@@
/* 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. */
/* 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
pingP
ong;
+package
app.pingp
ong;
import org.simgrid.msg.Msg;
import org.simgrid.msg.Msg;
+import org.simgrid.msg.MsgException;
import org.simgrid.msg.NativeException;
import org.simgrid.msg.NativeException;
-public class
PingPongTest
{
- public static void main(String[] args) throws
NativeException
{
+public class
Main
{
+ public static void main(String[] args) throws
MsgException, NativeException
{
Msg.init(args);
Msg.init(args);
- if(args.length <
2
) {
- Msg.info("Usage :
PingPongTest platform_file deployment
_file");
- Msg.info("example :
PingPongTest ../platforms/platform.xml pingPongDeployment
.xml");
+ if(args.length <
1
) {
+ Msg.info("Usage :
Main platform
_file");
+ Msg.info("example :
Main ../platforms/platform
.xml");
System.exit(1);
}
System.exit(1);
}
- /* construct the platform and deploy the application */
Msg.createEnvironment(args[0]);
Msg.createEnvironment(args[0]);
-
Msg.deployApplication(args[1]
);
-
- /* execute the simulation. */
+
new Sender("Jacquelin", "Sender", new String[] {"Boivin"}).start(
);
+ new Receiver ("Boivin", "Receiver", null).start();
+
Msg.run();
}
}
Msg.run();
}
}