Is there a Java library/API available to interact with Windows OS, like executing commands on the command prompt and returning the output back to the program?
+1
A:
Use the ProcessBuilder, which is available starting from Java 1.5!
It has the nice ability to let you redirect the error stream which makes you only have to cope with one InputStream to read from.
Daniel
2010-05-29 14:04:43