Dear All, I want to execute the java program which calls the subclasses. The output of the subclasses should be displayed on different MSDOS-Window Consoles. For this i am using the following piece of code.... Process proc=Runtime.getRuntime().exec("cmd /c start /k java test.SubClass1"); But I am not able to see different Consoles, though it had created the new process and excuted the program. My O.S Environment is Win2000 and the java version is 1.4 Advance TX for the suggestion given... Regards, Saradhi.
Going through runtime.exec that way will create a whole new instance of Java, a new JVM, all that good stuff. Is that really necessary? If you can run in the same JVM just call your class with SubClass1.main(someStringArray). I don't know of any way to open a console window with runtime.exec. It always runs things invisibly. You could connect streams to the stdout, errout and stdin of the running process and build your own window that looks a lot like a command window, but that's pretty complicated!
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi