Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix the examples now that they can throw potentially more exception types
[simgrid.git] / examples / java / basic / Master.java
index 594c392..eab3bf5 100644 (file)
@@ -10,7 +10,7 @@
 import simgrid.msg.*;
 
 public class Master extends simgrid.msg.Process {
-   public void main(String[] args) throws JniException, NativeException {
+   public void main(String[] args) throws MsgException {
       if (args.length < 4) {
         Msg.info("Master needs 4 arguments");
         System.exit(1);
@@ -25,7 +25,7 @@ public class Master extends simgrid.msg.Process {
       Msg.info("Hello! Got "+  slavesCount + " slaves and "+tasksCount+" tasks to process");
       
       for (int i = 0; i < tasksCount; i++) {
-        BasicTask task = new BasicTask("Task_" + i, taskComputeSize, taskCommunicateSize); 
+        Task task = new Task("Task_" + i, taskComputeSize, taskCommunicateSize); 
         Msg.info("Sending \"" + task.getName()+ "\" to \"slave_" + i % slavesCount + "\"");
         task.send("slave_"+(i%slavesCount));
       }