title: How to write into and read from command line in Java ?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/6335698/java-external-program">Java external program</a>  </p>
  </blockquote>
  
  
  
  <p>I am trying to wrtie a program to write a command on a command line,</p>
  
  <p>for example;</p>
  
  <blockquote>
    <blockquote>
      <p>ipconfig</p>
    </blockquote>
  </blockquote>
  
  <p>and then get the response of the command so I want to both write command to a command line and get its response. I have searched about it on the net and saw that apache cli is used to do this in Java but actually I did not clearly get how it can be done. Can you please help me about my situation with a few line of codes or tutorials about both writing and reading commands please?</p>
  
  <p>Thank you all very much</p>