谁能解释我下面的代码有什么问题?我尝试了不同的主机,FTPClientConfigs,它可以通过 firefox/filezilla 正确访问...问题是我总是得到空文件列表,没有任何异常(files.length == 0)。我使用与 Maven 一起安装的 commons-net-2.1.jar。
    FTPClientConfig config = new FTPClientConfig(FTPClientConfig.SYST_L8);
    FTPClient client = new FTPClient();
    client.configure(config);
    client.connect("c64.rulez.org");
    client.login("anonymous", "anonymous");
    client.enterRemotePassiveMode();
    FTPFile[] files = client.listFiles();
    Assert.assertTrue(files.length > 0);