how I choose between FTPclient in java vs linux binary ftpget to download file from ftpserver

时间:2016-04-25 09:12:28

标签: java busybox apache-commons-net

I want to download file from FTP server for that I have two ways 1)using FTPClient in java using commons-net-3.0.1.jar 2)linux Binary ftpget of busybox

Now I want to know that which utilities I should use in my application? I mean which parameter I should have to consider while selection right method for download file from ftp

1 个答案:

答案 0 :(得分:0)

That depends on your requirements; so there can't be a "generic" answer here.

If you are using a Java library, you have more control over the whole "process" (you can call methods using known types, stuff like that).

If you are calling some binary from your host operating system, that means that you have a dependency towards an element which is much harder to control than a 3rd party Java library.

In both situations, you have different sets of dependencies, that your application has to check for in the end (and it might be easier to ship a java application with its version of some apache commons library; versus making sure that you got a specific FTP binary on customer systems).