|
From: <de...@us...> - 2003-12-11 12:41:31
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/objet
In directory sc8-pr-cvs1:/tmp/cvs-serv23146/objet
Modified Files:
CExec.java
Log Message:
Ajout de fonctionnalites au modele h2d
Index: CExec.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/objet/CExec.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** CExec.java 25 Nov 2003 10:11:46 -0000 1.7
--- CExec.java 11 Dec 2003 12:41:27 -0000 1.8
***************
*** 9,12 ****
--- 9,13 ----
package org.fudaa.dodico.objet;
import java.io.BufferedReader;
+ import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
***************
*** 34,37 ****
--- 35,39 ----
MyReaderThread thOut_, thErr_;
CExecListener listener_;
+ File execDirectory_;
/**
* Commandes a null et les exceptions seront catchés et ecrites sur la sortie
***************
*** 54,58 ****
*/
public void setCommand(String[] _cmd) {
- System.out.println(_cmd.length);
cmd_= _cmd;
}
--- 56,59 ----
***************
*** 98,102 ****
return;
try {
! _th.join(2000);
} catch (InterruptedException _e) {}
if (!_th.isAlive())
--- 99,103 ----
return;
try {
! _th.join(500);
} catch (InterruptedException _e) {}
if (!_th.isAlive())
***************
*** 111,115 ****
}
try {
! _th.join(1000);
} catch (InterruptedException _e) {}
//on a attendu 50ms, on interrompt le thread
--- 112,116 ----
}
try {
! _th.join(500);
} catch (InterruptedException _e) {}
//on a attendu 50ms, on interrompt le thread
***************
*** 117,125 ****
_th.finish();
try {
! _th.join(2000);
} catch (InterruptedException _e) {}
}
} catch (SecurityException _e) {
! System.err.println(_e.getMessage());
}
}
--- 118,126 ----
_th.finish();
try {
! _th.join(500);
} catch (InterruptedException _e) {}
}
} catch (SecurityException _e) {
! DodicoLib.error(_e.getMessage());
}
}
***************
*** 145,149 ****
if (DodicoLib.DEBUG)
System.out.println("lancement processus");
! p= Runtime.getRuntime().exec(cmd_);
if (listener_ != null)
listener_.setProcess(p);
--- 146,153 ----
if (DodicoLib.DEBUG)
System.out.println("lancement processus");
! if (execDirectory_ != null)
! p= Runtime.getRuntime().exec(cmd_,null, execDirectory_);
! else
! p= Runtime.getRuntime().exec(cmd_);
if (listener_ != null)
listener_.setProcess(p);
***************
*** 299,302 ****
--- 303,318 ----
public void setListener(CExecListener _listener) {
listener_= _listener;
+ }
+ /**
+ *
+ */
+ public File getExecDirectory() {
+ return execDirectory_;
+ }
+ /**
+ *
+ */
+ public void setExecDirectory(File _file) {
+ execDirectory_= _file;
}
}
|