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");

any help could be appreciated!


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.