解决方法:get
首先设置ftp客户端的属性,it
添加一句:ftpClient.enterLocalPassiveMode(),ftp
再执行ftpClient.listFiles(pathname).length。方法