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 Runtime.exec()
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.
Please suggest. Thanks in advance.