title: Execute commands in irb from java
body: <p>I want to start irb (Interactive Ruby Shell) in terminal using java and then execute different commands on that already opened irb shell when particular event occurs.
    I have tried <code>Runtime.exec()</code> method but it executes commands on terminal or command prompt only and is unable to execute commands in irb shell. Also every time it executes commands on new instance of terminal instead of same instance. I want to execute multiple commands on same terminal instance instead of newly created instance of terminal.</p>
  
  <p>Please suggest.
  Thanks in advance.</p>