getting an Process Execute a command.

Hi All,

can I get the process created by the following code

Process p = Runtime.getRuntime().exec("db2cmd");

to execute some commands?

My problem is I am getting a new window created by executing this line.

My commands can be executed in the new window that gets created, how can I get a handle of this new window so that I can execute some commands in the new window.

Any suggestions will be helpful.

Regards

Ayusman

[498 byte] By [ayusman_dikshita] at [2007-10-3 2:00:58]
# 1
for example?have you seen processbuilder?
Gino86a at 2007-7-14 18:59:42 > top of Java-index,Java Essentials,Java Programming...
# 2
Can you please refer some site or material for processbuilder?RegardsAyusman
ayusman_dikshita at 2007-7-14 18:59:42 > top of Java-index,Java Essentials,Java Programming...
# 3

java.lang.ProcessBuilder

it's in the standard api starting with jdk 1.5

I don't see how it would help in this case though. Maybe there's something I'm just missing though.

You might want to consider creating a batch file to run all the various commands you want to do in that window.

paulcwa at 2007-7-14 18:59:42 > top of Java-index,Java Essentials,Java Programming...