![]() |
Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
The Runtime.exec() does not work like a commandli line. It does not understand redirection. You would need to read the output from the proc.getInputStream() and then redirect it yourself. Michael Daconta wrote an excellent article on this is Java World. Here is a link to it. Good luck, Peter
> Process p=Runtime.getRuntime().exec("pr -l 61 a.txt> b.txt"); > After I Run java Program, the file "b.txt" doesn't created. > Thanks a lot! > > > > my problem is using the Runtime's exec method i've launched a code like this > > > Process p = Runtime.getRuntime().exec("java test"); > > > in that particular 'test.java' which i am launching using the Runtime's exec method, i have written one > > > but i was unable to send some string data to that process which is hanging there at system.in.read? > > > How to solve this?
Replies: |
Sponsored Links
|