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:
Run examples.ftp.FTPClientExample.java
How to run the examples.ftp.FTPClientExample.java program?
✍: FYIcenter.com
You can follow these steps to download, view and run examples.ftp.FTPClientExample.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\ftp\FTPClientExample.java with text editor.
4. Run FTPClientExample.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.ftp.FTPClientExample space.mit.edu test test test test
220-space.mit.edu NcFTPd Server (free educational license) ready.
220-
220- This server is operated by the MIT Center for Space Research.
220- Only anonymous FTP access is allowed to this server. Use the
220- login Name `ftp', and use your e-mail address for the password.
220-
Connected to space.mit.edu on 21
USER *******
421 Only anonymous logins are allowed here.
Server closed connection.
org.apache.commons.net.ftp.FTPConnectionClosedException:
FTP response 421 received. Server closed connection.
at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:368)
at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:292)
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:503)
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:628)
at org.apache.commons.net.ftp.FTP.user(FTP.java:773)
at org.apache.commons.net.ftp.FTPClient.login(FTPClient.java:1077)
at examples.ftp.FTPClientExample.main(FTPClientExample.java:365)
The error is expected, because we did not provide correct options to the FTPClientExample.java program.
⇒ List FTP Directory with FTPClientExample.java
⇐ What Is examples.ftp.FTPClientExample.java
2017-05-12, ∼3624🔥, 0💬
Popular Posts:
Java Servlet API 3.0.1 Source Code Files are important if you want to compile them with different JD...
What Is js.jar in Rhino JavaScript 1.7R5? js.jar in Rhino JavaScript 1.7R5 is the JAR file for Rhino...
JDK 11 java.compiler.jmod is the JMOD file for JDK 11 Compiler module. JDK 11 Compiler module compil...
JDK 11 jdk.jconsole.jmod is the JMOD file for JDK 11 JConsole tool, which can be invoked by the "jco...
maven-model-builder-3.8. 6.jaris the JAR file for Apache Maven 3.8.6 Model Builder module. Apache Ma...