项目中添加该工具类,用一下语句调用 FTPUtil ftpUtil = new FTPUtil("172.16.1.41",21,"admin","123456"); ftpUtil.downLoadFile("20190913.txt","D:\\ftplocal\\20190913.txt"); ftpUtil.uploadFile("D:\\ftplocal\\20190913.txt","20190913.txt");