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.
I would like to use an open source solution that is well supported and runs with JDK 6.
I have found 3 options so far and would like some help deciding which one (or a better suggestion) to use.
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.
If I’m unable to use commons-net the next two options are:
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.
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. (http://www.javassh.org)
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.
Thanks.