Pages Navigation Menu

Coding is much easier than you think

How to start FTP programming with Java

Although it is possible to use Java networking API (by using the interfaces and classes available in the packages to write code that communicates with a FTP server, that approach is discouraged because you will have to spend a lot of time on understanding the underlying FTP protocol, implementing the protocol handlers, testing, fixing bugs… and finally you re-invent the wheel! Instead, it’s advisable to look around and pick up some ready-made libraries, and that definitely saves your time! TheApache Commons Net library is an ideal choice for developing FTP based applications. It’s not just for only FTP, but for all common standard internet protocols such as NNTP, SMTP, POP3, Telnet… to name just a few.

With built-in Java API, we can use the to do some FTP operations such as listing files and directories, upload and download. However that is very limited in terms of controllability and flexibility.

So, if you are going to write a Java application that needs to communicate with a FTP server, go on with Apache Commons Net.

Download It -€“ FTP jar files

About Mohaideen Jamil

I'm a Full stack developer of IT exp in J2EE, AngularJs, MicroServices, Docker, Spring (Boot, MVC, Cloud), Bluemix, DevOps. Follow me on Facebook or Google Plus. If you like my tutorials, consider making a donation to this charity, thanks.

%d bloggers like this: