I have an older project that uses the sun.net.ftp.FtpClient
class to download a file from an ftp server. It appears that Oracle has finally removed this unsupported/deprecated fea开发者_Python百科ture from Java. Any suggestions on what should be used to replace it? I was considering org.apache
classes but I have never used them. The best solution would be the simplest.
Dependending on your requirements i'd recommend to use either the FTP client provided by Apache Commons Net or edtFTP/j.
finj - FTP Client for Java Apps
What is finj ?
Sun provides
a FTP client written in Java as part of the standard classes.
Unfortunately, since the sun.net.ftp.*
classes are not
part of the java.*
packages, neither the source code
nor a complete API are available.
The goal of this project is to provide to developers a complete,
well designed, programmatically controllable Open-Source
FTP client written in the Java language. finj
then simply stands for 'FTP in Java'.
It provides an API similar to sun.net.ftp.FtpClient
so that you can use it without changing your code very much.
精彩评论