title: How to use Telnet from Java
body: <p>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?</p>
  
  <p>Thanks</p>