What Is examples.telnet.TelnetClientExample.java

Q

What is examples.telnet.TelnetClientExample.java?

✍: FYIcenter.com

A

examples.telnet.TelnetClientExample.java is an example program of demonstrating how to TelnetClient class.

An external option handler (SimpleTelnetOptionHandler) is used. Initial configuration requested by TelnetClient will be: WILL ECHO, WILL SUPPRESS-GA, DO SUPPRESS-GA. VT100 terminal type will be subnegotiated.

You can follow these steps to download, view and run examples.telnet.WeatherTelnet.java program.

1. Download commons-net-3.5-bin.zip file from Apache Commons Net.

2. Unzip all files from commons-net-3.5-bin.zip, and install them to C:\local. You should see C:\local\commons-net-3.5 folder with two JAR files and "examples" sub folder:

05/01/2016  11:37 PM           303,658 commons-net-3.5.jar
05/01/2016  11:37 PM            82,453 commons-net-examples-3.5.jar
05/01/2016  11:37 PM    <DIR>          examples

3. View C:\local\commons-net-3.5\examples\telnet\TelnetClientExample.java with a text editor.

4. Run TelnetClientExample.java in command window with both JAR files included in the classpath:

C:\fyicenter> java 
   -cp .;C:\local\commons-net-3.5\commons-net-3.5.jar
        ;C:\local\commons-net-3.5\commons-net-examples-3.5.jar 
   examples.telnet.TelnetClientExample

Usage: TelnetClientExample <remote-ip> [<remote-port>]

 

Connect to FreeChess.org with TelnetClientExample.java

P.E.I Weather from examples.telnet.WeatherTelnet.java

Using commons-net.jar in Java Programs

⇑⇑ FAQ for Apache commons-net.jar

2017-05-05, 2696🔥, 0💬