I am trying to make a function in Java :
public static void upload_files(String us, String pw, String ip, String f){
try
{
FTPClient client = new FTPClient();
client.connect(ip);
client.login(us,pw);
client.upload(f);
} catch(Exception e) {
e.printStackTrace();
}
}
I added apache libraries, but sadly I got an error on "upload" line I suppose I do not use correctly the method upload, but I don't know how to.
When I compile it with Netbeans, it is noticing me that there is an error line "client.upload(f);"
The error given in output is "java.lang.RuntimeException: Uncompilable source code - Erroneous sym type: org.apache.commons.net.ftp.FTPClient.upload"
Thank you all in advance. nb : "f" is the direct path to my file
EDIT :
The problem is "quite" solved since now I upload some files on my ftp server BUT sadly they are all empty, as noticed on below.