Telnet into Server

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Mar 2005
Posts: 30
Reputation: crestaldin is an unknown quantity at this point 
Solved Threads: 0
crestaldin crestaldin is offline Offline
Light Poster

Telnet into Server

 
0
  #1
Oct 28th, 2006
Hi everyone,

Can somene please explain to me how to run a telnet command using Java.I mean how can I achieve the following in Java : telnet mailServer PORT (where mailServer and PORT will be supplied)...and subequently capture response from the server.


Thanks .
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,396
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 255
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: Telnet into Server

 
0
  #2
Oct 28th, 2006
Runtime.exec()
capturing the output and err streams and feeding the inputstream

or opening a socket connection and attempting the protocol yourself.

Read the API and tutorials for those, and search javaworld.com for a good document on the pitfalls of Runtime.exec
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 30
Reputation: crestaldin is an unknown quantity at this point 
Solved Threads: 0
crestaldin crestaldin is offline Offline
Light Poster

Re: Telnet into Server

 
0
  #3
Oct 28th, 2006
Thanks a lot
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC