-1

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?

3 Answers 3

5

You can use java.lang.Runtime.exec() to do it, but read this first.

Sign up to request clarification or add additional context in comments.

Comments

2

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.

Comments

0

Good article here: Runtime.exec() and the API is here: link text

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.