title: EclipseRCP: Running a system command and print output in custom Console
body: <p>I have created a custom console in eclipse by extending IOConsole using the following code.</p>
  
  <pre><code>IConsoleManager consoleManager = ConsolePlugin.getDefault().getConsoleManager();
  IOConsole console = new MyConsole("My Custom Console", null);
  consoleManager.addConsoles(new IConsole[] { console });
  </code></pre>
  
  <p>The console is getting created properly and i am able to view the console in the list of consoles displayed in the RCP application.</p>
  
  <p>I want to run a system command and want to associate the output in the custom console in <strong>REALTIME</strong>. I have written the following code but it doesn't seem to work. </p>
  
  <pre><code>ConsolePlugin plugin = ConsolePlugin.getDefault();
  IConsole[] consoles = plugin.getConsoleManager().getConsoles();
  for (IConsole iConsole : consoles) {
      if (iConsole instanceof MyConsole) {
          console = (MyConsole) iConsole;
          break;
      }
  }
  Runtime runtime = Runtime.getRuntime();
  Process process = runtime.exec("mvn --version");
  console.setInputStream(process.getInputStream());
  </code></pre>
  
  <p>Any suggestions?</p>