Is there an equivalent to Python's popen2 in Java?
+2
A:
System.getRuntime()
yields the Runtime object, from which you can make various .exec(...)
calls that spawn a Process
object. This has input and output streams and a status.
relet
2010-08-13 14:56:24
+3
A:
I believe the Process
object is what you're looking for. Javadoc here. You use it something like Process myProcess = System.getRuntime().exec("cmd here"));
It allows you to get the standard and error output streams.
Poindexter
2010-08-13 14:58:23
exactly what i was looking for, thanks!
dave
2010-08-13 15:07:17