PDA

View Full Version : Quick Java question



skipsbro
December 6th, 2009, 07:12 PM
Does anyone know if Java has a method similar to the C/C++ "system()" function?

Reiger
December 6th, 2009, 08:33 PM
Something like

Process proc = Runtime.getRuntime().exec(/* pick your argument flavour here; they come in many varieties */);

And then obtain your output via the I/O streams of the process.

Quick Google for a tutorial: http://devdaily.com/java/edu/pj/pj010016/