title: Is is possible to direct windows console output to a GUI?
body: <p>I'm working on a project and I would like to execute programs in the windows console or a linux terminal.</p>
  
  <p>Instead of launching a new console and working the program in it I want to do something like the following:</p>
  
  <pre><code>rt.exec("cmd.exe /c start cmd.exe /k ruby rubycode.rb");
  </code></pre>
  
  <p>From this point on I want the user to be able to work with the program from the GUI/my program. The idea in my min is starting cmd in silent mode where it is not visible and latching on to it. Then redirecting the console output to the GUI and letting the user input data to the console through the GUI.</p>
  
  <p>A similar concept is what most IDEs like jgrasp do. When you run a program you interface with it though their own command prompt.</p>
  
  <p>How is this done? Iv'e tried grabbing the IOStreams from the process and trying to atleast print what the console outputs but no luck.</p>