If you can resolve an IP address
and your firewall permits it, you should be able to ftp to the host - if an FTP server is listening on that IP address.
For example, you should have no trouble connecting to ftp.sun.com as an anonymous user.
However your network may be configured in such a way that you require a proxy to FTP outside it.
i can comprehend from this that when i give a hostname present in the local LAN my rogram runs fine but if i give a hostname like "yahoo.com" it gives me unknownhost exception.
my network managers say that i can connect only to a local lan host in this manner and not a host outside this lan.