Apache FTP Client has some unresolved issues. Below are instructions on using Ftp4J to efficiently handle ftp programmatically, although java.
Download Ftp4J: http://www.sauronsoftware.it/projects/ftp4j/download.php
Then in your IDE:
import java.io.File; import java.io.IOException; import it.sauronsoftware.ftp4j.FTPAbortedException; import it.sauronsoftware.ftp4j.FTPClient; import it.sauronsoftware.ftp4j.FTPDataTransferException; import it.sauronsoftware.ftp4j.FTPException; import it.sauronsoftware.ftp4j.FTPIllegalReplyException; public class FTP4J { public static void main(String[] args) throws IllegalStateException, IOException, FTPIllegalReplyException, FTPException, FTPDataTransferException, FTPAbortedException { FTP4J ftp= new FTP4J(); ftp.transfer(); } private void transfer() throws IllegalStateException, IOException, FTPIllegalReplyException, FTPException, FTPDataTransferException, FTPAbortedException{ FTPClient client = new FTPClient(); client.connect("192.168.0.1");
Chris
source share