The moose likes Android and the fly likes Help with FTP transfer Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Mobile » Android
Reply Bookmark "Help with FTP transfer" Watch "Help with FTP transfer" New topic
Author

Help with FTP transfer

Sean Charboneau
Greenhorn

Joined: May 31, 2011
Posts: 2
I am trying to implement a part of my program such that it will up/download files to/from my ftp server. The server is set up correctly; that is, I can access it from a web browser just by typing in the server address. However, when I try to access it from within my application, it throws a ConnectionException error. The port is open, firewall disabled, etc, etc. Here is the code, gotten pretty much word for word from here. My code is below. Any help would be great; I'm under a bit of a time crunch.

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 13842

As you say, the server is fine. I could connect and even sign in. (You have an easily-guessed password, so I edited the user ID in your post.)

So that most likely means there's no problem with the code, but the problem is somewhere in the Android configuration. However you might get some clue from looking at the stack trace to see whether the error is thrown when trying to connect, when trying to log in, or when trying to set passive mode.
Sean Charboneau
Greenhorn

Joined: May 31, 2011
Posts: 2
I have also tried running that same code in a standalone application separate from the Android environment (minus the Android-specific code), with no more luck. The following is the error I get:

 
 
subject: Help with FTP transfer
 
Threads others viewed
Hi All
how to get progress bar after selecting a view
FTP via web application
Problem FTP the files using java
FTP: Transfer is working but all TXT files have no content
developer file tools