I need to telnet to a server, execute a few scripts, give inputs to those and receive output.
Can I directly use Runtime.exec() and give the telnet command or do I need to learn about sockets?
I understand that in the exec() method, I might need to do the input and output in 2 threads, is that right?
Thanks
Neither. Use Apache Commons Net, specifically the Telnet support part. No need to muck about with external processes, low-level socket handling or telnet command codes.