Hi Rob ... Thanks for your reply , I do managed to find out apache thing for Telnet ..but i am not able to find open source libraries ( free to use in my commerical application ) ..thanks for the link ...
Apache Commons are licensed under the Apache license (no surprise there), which is an open source license. You can use it in commercial applications without charge, as long as the other provisions of the license are respected (like attribution of the code).
As an aside, if you have a choice of SSH and Telnet, use SSH. That's where everybody is moving to, mostly for security reasons.