[Biojava-l] (no subject)

Schreiber, Mark mark.schreiber@agresearch.co.nz
Thu, 26 Apr 2001 09:18:32 +1200


Hi,

I did this once and it seems to work in most (but not all) cases, at least
on a windows platform, probably works better on unix.

You need to obtain a process by doing something like:

String "c:\program.exe"
Runtime r = Runtime.getRuntime();
Process p = r.exec(command); // there are lots of variants of this method
InputStream stdout = p.getInputStream(); // input from the process ie STDOUT
InputStream stderr = p.getErrorStream(); // error stream of the process ie
STDERR
OutputStream stdin = p.getOutputStream(); // output to the process ie STDIN

you can them use the streams to read and write to and from the process. In
my experience it is better to send arguments at the command line, it is more
difficult to send commands to a more interactive program.

Mark

> -----Original Message-----
> From: Subba_Raju [mailto:Subba_raju@i-labs.ws]
> Sent: Wednesday, April 25, 2001 10:11 PM
> To: biojava-l@biojava.org
> Subject: [Biojava-l] (no subject)
> 
> 
> dear biojava associates,
> i am somewhat new to java.
> my problem is that i have an exe( i have only binaries ) 
> application which
> actually takes some command line arguments but i dont want to 
> access the
> application through the command line instead my need is to give those
> arguments through java code .
> can any one please suggets me classes or methods for making 
> this possible
> thanks for ur  earlier attention 
> thanks inadvance
> Subba Raju,
> iL@bs
> India
> 
> 
> 
> _______________________________________________
> Biojava-l mailing list  -  Biojava-l@biojava.org
> http://biojava.org/mailman/listinfo/biojava-l
>