Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
java: kill obscure NativeException
[simgrid.git] / examples / java / trace / pingpong / Main.java
index 1e82ea8..782f68f 100644 (file)
@@ -6,24 +6,27 @@
 
 package trace.pingpong;
 import org.simgrid.msg.Msg;
-import org.simgrid.trace.Trace;
 import org.simgrid.msg.MsgException;
-import org.simgrid.msg.NativeException;
+import org.simgrid.trace.Trace;
 
 public class Main  {
-  public static void main(String[] args) throws MsgException, NativeException {
+  private Main() {
+    throw new IllegalAccessError("Utility class");
+  }
+
+  public static void main(String[] args) throws MsgException {
     Msg.init(args);
     if(args.length < 1) {
-      Msg.info("Usage   : TracingTest platform_file");
-      Msg.info("example : TracingTest ../platforms/platform.xml");
+      Msg.info("Usage   : Main platform_file");
+      Msg.info("example : Main ../platforms/platform.xml");
       System.exit(1);
     }
 
     /* construct the platform and deploy the application */
     Msg.createEnvironment(args[0]);
-    new Sender("Jacquelin", "Sender", new String[] {"Boivin", "Marcel"}).start();
+    new Sender("Jacquelin", "Sender", new String[] {"Boivin", "Tremblay"}).start();
     new Receiver ("Boivin", "Receiver", null).start();
-    new Receiver ("Marcel", "Receiver", null).start();
+    new Receiver ("Tremblay", "Receiver", null).start();
 
     /* Initialize some state for the hosts */
     Trace.hostStateDeclare ("PM_STATE");