Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix last commit of Medhi so that the Java bindings still commit
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 23 Mar 2010 12:38:30 +0000 (12:38 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 23 Mar 2010 12:38:30 +0000 (12:38 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7313 48e7efb5-ca39-0410-a469-dd3cf9ba447f

examples/java/basic/Slave.java
examples/java/comm_time/Slave.java
examples/java/ping_pong/Receiver.java
examples/java/suspend/DreamMaster.java
src/Makefile.am
src/java/simgrid/msg/Process.java

index 4249fdb..90784ff 100644 (file)
@@ -8,7 +8,7 @@
 import simgrid.msg.*;
 
 public class Slave extends simgrid.msg.Process {
 import simgrid.msg.*;
 
 public class Slave extends simgrid.msg.Process {
-   public void main(String[] args) throws NativeException {
+   public void main(String[] args) throws MsgException {
       if (args.length < 1) {
         Msg.info("Slave needs 1 argument (its number)");
         System.exit(1);
       if (args.length < 1) {
         Msg.info("Slave needs 1 argument (its number)");
         System.exit(1);
index df6b84a..539fd34 100644 (file)
@@ -8,7 +8,7 @@
 import simgrid.msg.*;
 
 public class Slave extends simgrid.msg.Process {
 import simgrid.msg.*;
 
 public class Slave extends simgrid.msg.Process {
-   public void main(String[] args) throws NativeException {
+   public void main(String[] args) throws MsgException {
       if (args.length < 1) {
         Msg.info("Slave needs 1 argument (its number)");
         System.exit(1);
       if (args.length < 1) {
         Msg.info("Slave needs 1 argument (its number)");
         System.exit(1);
index e432c90..9603a76 100644 (file)
@@ -15,7 +15,7 @@ public class Receiver extends simgrid.msg.Process {
    final double commSizeLat = 1;
    final double commSizeBw = 100000000;
     
    final double commSizeLat = 1;
    final double commSizeBw = 100000000;
     
-   public void main(String[] args) throws NativeException {
+   public void main(String[] args) throws MsgException {
         
       Msg.info("hello!");
       double communicationTime=0;
         
       Msg.info("hello!");
       double communicationTime=0;
index 9f7cb70..c548d9a 100644 (file)
@@ -11,7 +11,7 @@ import simgrid.msg.*;
 
 public class DreamMaster extends simgrid.msg.Process {
     
 
 public class DreamMaster extends simgrid.msg.Process {
     
-   public void main(String[] args) throws NativeException {
+   public void main(String[] args) throws MsgException {
       Msg.info("Hello !");
       Msg.info("Let's create a lazy guy.");
        
       Msg.info("Hello !");
       Msg.info("Let's create a lazy guy.");
        
index 72c04a9..05cc755 100644 (file)
@@ -257,6 +257,7 @@ JMSG_JAVA_SRC = \
   java/simgrid/msg/NativeException.java              \
   java/simgrid/msg/HostNotFoundException.java        \
   java/simgrid/msg/ProcessNotFoundException.java     \
   java/simgrid/msg/NativeException.java              \
   java/simgrid/msg/HostNotFoundException.java        \
   java/simgrid/msg/ProcessNotFoundException.java     \
+  java/simgrid/msg/TaskCancelledException.java       \
   \
   java/simgrid/msg/Msg.java                          \
   java/simgrid/msg/Process.java                      \
   \
   java/simgrid/msg/Msg.java                          \
   java/simgrid/msg/Process.java                      \
index 5fe1535..8d2b2ca 100644 (file)
@@ -283,17 +283,11 @@ public abstract class Process extends Thread {
                MsgNative.processWaitFor(seconds);
        } 
        public void showArgs() {
                MsgNative.processWaitFor(seconds);
        } 
        public void showArgs() {
-               try {
-                       Msg.info("[" + this.name + "/" + this.getHost().getName() + "] argc=" +
-                                       this.args.size());
-                       for (int i = 0; i < this.args.size(); i++)
-                               Msg.info("[" + this.msgName() + "/" + this.getHost().getName() +
-                                               "] args[" + i + "]=" + (String) (this.args.get(i)));
-               } catch(MsgException e) {
-                       Msg.info("Damn JNI stuff");
-                       e.printStackTrace();
-                       System.exit(1);
-               }
+               Msg.info("[" + this.name + "/" + this.getHost().getName() + "] argc=" +
+                               this.args.size());
+               for (int i = 0; i < this.args.size(); i++)
+                       Msg.info("[" + this.msgName() + "/" + this.getHost().getName() +
+                                       "] args[" + i + "]=" + (String) (this.args.get(i)));
        }
        /**
         * This method runs the process. Il calls the method function that you must overwrite.
        }
        /**
         * This method runs the process. Il calls the method function that you must overwrite.