FTPing files with Java

On my last project, we had a requirement to send a file to an FTP server. We’ve all used FTP servers at some point in time. However, I never had to access an FTP via Java code. After a quick Google search, I came across the Jakarta Commons NET package. This package provides a collection of network related classes for FTP, Telnet, POP3, etc…

It didn’t take much work to add FTP support. I simply downloaded the JAR file from the Jakarta Commons NET website.

And then I dropped in this sample code:

Did you like my blog post?

Signup now and receive an email when I publish new luv2code content.

I agree to have my personal information transfered to AWeber ( more information )

I will never give away, trade or sell your email address. You can unsubscribe at any time.

Leave a Reply