Android connect win7 FTP server
来源:互联网 发布:top k 算法 编辑:程序博客网 时间:2024/05/22 06:13
1.Win7下搭建好自带FTP服务器(教程网上很多,禁用ssl)
2.设置好连接地址(ftp://192.168.xx.xx)
3.使用开源库org.apache.commons.net
try { FTPClient ftpClient = new FTPClient(); ftpClient.connect(InetAddress.getByName(Your host Url)); if(ftpClient.login(loginName, password)){ //TODO }} catch (Exception e) { e.printStackTrace();}
--------------------------------
问题:
1.java.net.UnknownHostException: Unable to resolve host "ftp://192.168.xx.xx": Non-recoverable failure in name resolution
fix:把ftp://192.168.xx.xx换成192.168.xx.xx来连接
2.连接时出现
220 Microsoft FTP ServiceUSER xxx530 Valid hostname is expected.fix:把win7 ftp网站绑定的主机名删除。
3.显示中文乱码
fix:ftp.setControlEncoding("GBK");
0 0
- Android connect win7 FTP server
- Android开发 之 Connect to FTP server example
- Android-FTP Server (swiftp)
- Word Press提示Fail to connect FTP server
- Win7 SSH Secure connect Ubuntu: server responded algorithm negotiation failed
- Win7 SSH Secure connect Ubuntu: Server responded "Algorithm negotiation failed"
- android 基于apache ftp server
- android 基于apache ftp server
- win7下filezilla—server 的ftp服务器搭建
- ftp: connect: Connection refused
- WinSCP command to connect to FTP server to get/put files
- 在WIN7中如何启用Web Server和FTP Server服务
- ftp server
- ftp server
- ftp server
- ftp-server
- 1130 - Host ‘win7' is not allowed to connect to this mysql server
- 1130 - Host ‘win7' is not allowed to connect to this mysql server
- 蛮力法之冒泡排序(C实现)
- 【Android】Fragment真正意义上的onResume和onPause
- 进程相关
- unity发射弓箭轨迹的实现
- 对于offsetLeft的一些简单理解
- Android connect win7 FTP server
- iGrimace安装步骤
- 类加载器
- 关于链表的递归操作
- Codeforces 592D Super M 【求解包含若干个点的最小树 + 树的直径】
- SOCKS与Linux安装代理服务器ss5
- 使用html写一个android关于界面,事情原来可以如此简单
- [sicily]1935. 二叉树重建
- Android Security Model