I appear to become uploading corrupt jar files to some remote server using Apache's FTPClient 3..1. I'm also setting the file and file transfer type to binary.

FTPClient ftp = new FTPClient();

FileInputStream fis = new FileInputStream("filename");
ftp.setFileTransferMode(org.apache.commons.net.ftp.FTP.BINARY_FILE_TYPE);
ftp.setFileType(FTPClient.BINARY_FILE_TYPE);
ftp.storeFile(fis);
fis.close();
ftp.logout();
ftp.disconnect();

any help could be appreciated!

Jason

Several things to test:

Are you currently absolutely 100% positive that:

a) storeFile() is coming back true b) you are not tossing the best somewhere

should you step through it inside a debugger will it complete each get in touch with your routine, and also the file still ends up as partial around the ftp server?

What area of the file is not dealing with the ftp server? Produce a test file that consists of bytes -255 repeated five or ten occasions, then try uploading that. Then download the end result and find out what's getting wiped out.