Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
Connect to FTP Server with TelnetClientExample.java
Can I connect to a FTP server with examples.telnet.TelnetClientExample.java program?
✍: FYIcenter.com
Yes, you can connect to a FTP server with examples.telnet.TelnetClientExample.java program.
But you have to know very well about the FTP protocol to be able to change directory or
download files.
Here is an example of using examples.telnet.TelnetClientExample.java program to connect to ietf.org FTP server:
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 ietf.org 21
TelnetClientExample
Type AYT to send an AYT telnet command
Type OPT to print a report of status of options (0-24)
Type REGISTER to register a new SimpleOptionHandler
Type UNREGISTER to unregister an OptionHandler
Type SPY to register the spy (connect to port 3333 to spy)
Type UNSPY to stop spying the connection
Type ^[A-Z] to send the control character; use ^^ to send ^
220 FTP server ready
USER anonymous
331 Anonymous login ok, send your complete email address as your password
PASS jo@jo.com
230 Anonymous access granted, restrictions apply
CWD rfc
250-
*====================================================================*
* *
* This directory is maintained by the RFC Editor. If you experience *
* any problems, please report them to rfc-editor@rfc-editor.org. *
* *
*====================================================================*
250 CWD command successful
PASV
227 Entering Passive Mode (4,31,198,44,241,19).
(go to another command window)
(telnet 4,31,198,44 61715)
( port is calculated as 61715=241*256+19)
LIST
150 Opening ASCII mode data connection for file list
(directory list will displayed in the other window)
226 Transfer complete
⇒ What Is examples.ntp.TimeClient.java
⇐ Connect to Yahoo Website with TelnetClientExample.java
2017-04-08, ∼3316🔥, 0💬
Popular Posts:
What JAR files are required to run sax\Writer.java provided in the Apache Xerces package? 1 JAR file...
JDK 11 jdk.internal.vm.ci.jmod is the JMOD file for JDK 11 Internal VM CI module. JDK 11 Internal VM...
Java Architecture for XML Binding (JAXB) is a Java API that allows Java developers to map Java class...
What JAR files are required to run dom\Counter.java provided in the Apache Xerces package? You can f...
JDK 11 jdk.internal.vm.compiler .jmodis the JMOD file for JDK 11 Internal VM Compiler module. JDK 11...