Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
    Bookmark Topic Watch Topic
  • New Topic

Downloading file from FTP using Java  RSS feed

 
Richa Sharma
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi Guys

I am trying to download files from FTP on a machine in another domain and having password protection using following code.

Do I have to supply the username and password while connecting programatically as shown below. The code as such is not
working. The getContentLength() method gives -1 which means length can't be determined. Any Suggestions?




Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post the same question more than once.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!