views:

4699

answers:

8

Since I received no positives answers to my last question. I will try to write a Java FTP upload applet myself.

My question is: "Can you recommend a Java FTP client library for me to use?"

I want it to be:

  • stable
  • able to handle passive and active modes
  • able to provide upload progress information
  • throw catchable exceptions if something went wrong (especially when an upload does not succeed)
  • cheap/free to use, preferably open source

I found this overview of some libraries, but since this article is from 2003, maybe some new developments have happened :)

+11  A: 

Check out Apache commons-net, which contains FTP utilities. Off the top of my head I'm not sure if it meets all of your requirements, but it's certainly free!

Leigh
This info bit is added here although it is unrelated to the question - just wanted to place it somewhere. commons-net FtpClient still lacks IPv6 support (RFC 2438) in the latest 2.0 release dated 2008. 2.1 is supposed to include it however. They dont release very often...
Moritz Both
+1  A: 
VonC
+2  A: 

Hi there,

Commons-net surely. :) Most open source projects use it these days.

yc

yclian
+1  A: 

Hi,

I used Apache Commons VFS

cya

SourceRebels
+1  A: 

I have successfully used the Enterprise DT FTP library, which is free and open source. I can't compare it to other libraries (like the Apache Commons Net library) since I haven't used them. It does provide a simple upgrade path to SFTP (over SSH) and FTPS (over SSL), though that is a pay-for commercial product.

Cozzman
+1  A: 

Apache commons-nets get updates more frequently recently, while Enterprise DT library seems to update even more frequently.

+1  A: 

Yes, EnterpriseDT's edtFTPj is stable (first released in 2000), has all the features you might need, and is open source as well.

It's used in a bunch of open source projects (as well as in many commercial projects), and is acknowledged to be one of the fastest client libraries around.

As another poster noted, if you do wish to upgrade to SFTP and/or FTPS, it is a simple upgrade path with very few code changes required.

Bruce Blackshaw
A: 

ftp4j is the best one, both for features and license:

http://www.sauronsoftware.it/projects/ftp4j/

Cocco