I\'m trying to upload a simple txt file via FTP using XAMPP and FileZilla.
I\'m using the Apache Commons Net 3.0.1 Library.
This is my code, very basic things:
Set:
client.setUseEPSVwithIPv4( true );
This works if you can't make changes to Window's firewall settings.
Solved by running this as administrator in the command prompt:
netsh advfirewall set global StatefulFTP disable
This is a Java 7 bug on Windows machines, it is reported here.
I'm honestly not sure but you should try the following:
Use something like the following code:
System.out.println(client.getReplyCode());
for(String s : client.getReplyStrings())
System.out.println(s);
after client.login("user", "password");
to verify the status of your connection.
If you don't get any good hints from the code above, after invoking client.storeFile("textfile.txt", in);
try to add client.completePendingCommand();
.
Good luck! :)