File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Problem with FTPClient?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Problem with FTPClient??" Watch "Problem with FTPClient??" New topic
Author

Problem with FTPClient??

Bikash Paul
Ranch Hand

Joined: Dec 04, 2001
Posts: 342
Hi all friends,
I am developing one FTP client for uploading and downloading file to and from my webserver but when Iam trying to upload and download file then my FTP client connected to host and showing me user login OK but after that it is giving me 'Error:sun.net.ftp.FTPProtocolException'.I have tried to find it out why it is giving me error but couldn't.Can any one plz try with my code and help me to slove my problem.Below r my codes.

Regards
Bikash
[ July 25, 2003: Message edited by: Bikash Paul ]
zb cong
Ranch Hand

Joined: Jan 14, 2002
Posts: 416
hi
the sun package is not supported,why don't you use the appache commons net package to write the ftp program.
Bikash Paul
Ranch Hand

Joined: Dec 04, 2001
Posts: 342
Hi,
Why Sun net package not supported?Can u plz give me link of appache commons net package so that I can use that to write my Ftp program
Regards
Bikash
[ July 26, 2003: Message edited by: Bikash Paul ]
Bikash Paul
Ranch Hand

Joined: Dec 04, 2001
Posts: 342
Hi,
Now I have modified my putFile() method's code but still Iam getting below Error.Can any one plz guide me where Iam doing wrong.
Connecting to host www.kdkinfotech.com
User kmrraj login OK
Directory: img
File C:\config_file.txt: 796 bytes
The value of m_sHostFile:C:\config_file.txt
Error from put method: sun.net.ftp.FtpProtocolException: STOR config_file.txt
Modified code of putFile() method:-

Regards
Bikash
[ July 26, 2003: Message edited by: Bikash Paul ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with FTPClient??