title: Looking for Java Telnet emulator
body: <p>I am writing a back end program that telnets into a server, runs some commands and saves all the output from those commands.  Something just like Expect.</p>
  
  <p>I would like to use an open source solution that is well supported and runs with JDK 6.  </p>
  
  <p>I have found 3 options so far and would like some help deciding which one (or a better suggestion) to use.</p>
  
  <p>commons-net – This is very well supported but I having trouble getting a simple “Log in and do ‘ls’” command working.  I would prefer to use this library, if anyone can provide a simple example (and not the example that comes with it that takes input from the user) I would like to go that route.  </p>
  
  <p>If I’m unable to use commons-net the next two options are:</p>
  
  <p>JExpect – This is not that hard to use, does what I need but how well supported is it?  Will it work with JDK 6, I think so.</p>
  
  <p>Java Telnet Application (jta26) – This was easy to use but I’m not sure how versatile it is.  I didn’t see any place to set a timeout value in the TelnetWrapper.  I also was not sure if this code is being maintained since the last update to the site was in 2005. (<a href="http://www.javassh.org" rel="noreferrer">http://www.javassh.org</a>)</p>
  
  <p>I know this is somewhat opinion oriented and hope SO is a good place to help me make a decision so I don’t start down one road and find out later it’s not what I’m looking for.  </p>
  
  <p>Thanks.</p>