Re: how to call a dos program from a java program
Posted By:
Ranjan_Sinha
Posted On:
Thursday, March 29, 2001 08:47 PM
It is very simple to do this.
Create an opject of type Process.Get an Object of type Runtime.You can do this with the following code
Process p ;
Runtime r = Runtime.getRuntime();
p = r.exec(" Full Path of your Dos Application");
Now you can send input to the Dos program by sending a stream to p through getInputStream() and receiving the output through getOutPutStream(). It will be a good idea to have BuffereReader and BufferedWriter do the reading and writing part.
Re: how to call a dos program from a java program
Posted By:
John_Zukowski
Posted On:
Thursday, March 29, 2001 08:46 AM
Look in the FAQ. The answer is already there with a working program.