Can someone give me the code in java (or c++) for executing a command-line program like telnet and then sending arguments to the program like:
>o
>localhost