我让这个方法连接到本地或远程FTP服务器。当我在Eclipse(IDE)中启动此方法时,它工作正常。但是当我尝试在EBUS-J(它是一个使用像BASIC这样的编程语言的Java源代码生成器)中运行它时,它不会通过connect方法。这是方法:
chmod
这就是我的本地服务器所说的,如果它成功退出了eclipse。 当我通过我的口译员启动我生成的程序时,它会在" AUTL TLS"停止,见底部:
public String doConnect() {
try {
System.out.println("before connection");
this.ftps.connect(this.server);
System.out.println("before SetBufferSize");
this.ftps.setBufferSize(1000);
System.out.println("before Login");
if (!this.ftps.login(this.username, this.password)) {
this.ftps.logout();
System.out.println("logged out");
}
System.out.println("before positiveCompletion");
if (!FTPReply.isPositiveCompletion(this.ftps.getReplyCode())) {
this.ftps.disconnect();
System.out.println("disconnected");
return returnTrue("false");
} else {
return returnTrue("true");
}
} catch (Exception e) {
return returnFalse("Couldnt connect to server");
}
}
(000001)29.05.2017 12:59:49 - (not logged in) (127.0.0.1)> Connected, sending welcome message...
(000001)29.05.2017 12:59:49 - (not logged in) (127.0.0.1)> 220-FileZilla Server version 0.9.41 beta
(000001)29.05.2017 12:59:49 - (not logged in) (127.0.0.1)> 220-written by Tim Kosse (Tim.Kosse@gmx.de)
(000001)29.05.2017 12:59:49 - (not logged in) (127.0.0.1)> 220 Please visit http://sourceforge.net/projects/filezilla/
(000001)29.05.2017 12:59:49 - (not logged in) (127.0.0.1)> AUTH TLS
(000001)29.05.2017 12:59:49 - (not logged in) (127.0.0.1)> 234 Using authentication type TLS
(000001)29.05.2017 12:59:49 - (not logged in) (127.0.0.1)> SSL connection established
(000001)29.05.2017 12:59:49 - (not logged in) (127.0.0.1)> USER root
(000001)29.05.2017 12:59:49 - (not logged in) (127.0.0.1)> 331 Password required for root
(000001)29.05.2017 12:59:49 - (not logged in) (127.0.0.1)> PASS
(000001)29.05.2017 12:59:49 - root (127.0.0.1)> 230 Logged on
(000001)29.05.2017 12:59:49 - root (127.0.0.1)> TYPE I
(000001)29.05.2017 12:59:49 - root (127.0.0.1)> 200 Type set to I
(000001)29.05.2017 12:59:49 - root (127.0.0.1)> PASV
(000001)29.05.2017 12:59:49 - root (127.0.0.1)> 227 Entering Passive Mode (127,0,0,1,219,159)
(000001)29.05.2017 12:59:49 - root (127.0.0.1)> STOR Beispieldatei.txt
(000001)29.05.2017 12:59:49 - root (127.0.0.1)> 150 Connection accepted
(000001)29.05.2017 12:59:49 - root (127.0.0.1)> disconnected.
这是包含最新FileZilla版本的日志文件:
(000030)10.05.2017 16:51:20 - (not logged in) (127.0.0.1)> Connected, sending welcome message...
(000030)10.05.2017 16:51:20 - (not logged in) (127.0.0.1)> 220-FileZilla Server version 0.9.41 beta
(000030)10.05.2017 16:51:20 - (not logged in) (127.0.0.1)> 220-written by Tim Kosse (Tim.Kosse@gmx.de)
(000030)10.05.2017 16:51:20 - (not logged in) (127.0.0.1)> 220 Please visit http://sourceforge.net/projects/filezilla/
(000030)10.05.2017 16:51:20 - (not logged in) (127.0.0.1)> AUTH TLS
(000030)10.05.2017 16:51:20 - (not logged in) (127.0.0.1)> 234 Using authentication type TLS
(000030)10.05.2017 16:52:20 - (not logged in) (127.0.0.1)> 421 Login time exceeded. Closing control connection.
正如我所提到的,在eclipse中运行它可以正常工作,但是使用EBUS-J,我猜它不会通过SSL / TLS握手。
有什么想法吗?谢谢,路易斯