开发者

UnknownHostexception using apache commons

I am currently working with apache commons in my Project to gain access to my FTP Serv开发者_开发技巧er. Uploading a file is no problem at all, but If I want to download a file, I get an UnknownHost Exception what is strange because it is the same ftp server.

client.connect("ftp.liamissimo.li.ohost.de",21);
client.login("XXX", "XXX");
client.enterLocalPassiveMode();

This code works like this for uploading, but if I use it to download I got an UnknownHost exception.


I had a problem like this and I got it to work by using the IP of the hostname instead of the actual hostname...


check permissions in manifest file.

uses-permission android:name="android.permission.INTERNET"/>

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜