我用过这段代码
import org.apache.commons.net.ftp.FTPClient;
import java.io.FileInputStream;
import java.io.IOException;
public class FTPClientExample {
public static void main(String[] args) {
FTPClient client = new FTPClient();
FileInputStream fis = null;
try {
client.connect("hostname");
client.login("user", "pwd");
String filename = "D:\\Task\\try.txt";
fis = new FileInputStream(filename);
client.storeFile(filename, fis);
client.logout();
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
if (fis != null) {
fis.close();
}
client.disconnect();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
当我运行它时,我完成了消息任务。但我找不到我应该在哪个文件夹中查找文件。有人请帮助我吗?