开发者_开发知识库in my lacal drive i created a zip folder whom i want to upload at FTP server by using the put command of ANT.pls give me some idea...
Don't know if you're meaning this but check the Apache Commons library. http://commons.apache.org/net/index.html
Would be something like:
import org.apache.commons.net.ftp.*;
...
...
FTPClient ftp = new FTPClient();
ftp.connect(FTP_HOST);
ftp.login(FTP_USER, FTP_PASS);
ftp.changeWorkingDirectory(FTP_PATH);
ftp.setFileTransferMode(FTPClient.BINARY_FILE_TYPE);
FileInputStream fis = new FileInputStream(fileName);
ftp.storeFile(fileName,fis);
ftp.logout();
精彩评论