Hello,
I think I have found a problem with edtFTPj/PRO and Java 7. The following test-code runs well under Java 6, but crash with Java 7:
<code>
ProFTPClient ftp = null;
Logger log = Logger.getLogger(CUtility.class);
Logger.setLevel(Level.ALL);
ftp = new ProFTPClient();
ftp.setRemoteHost(strHost);
ftp.connect();
FTPMessageCollector listener = new FTPMessageCollector();
ftp.setMessageListener(listener);
log.debug("Logging in");
ftp.login(strUser, strPass);
log.debug("Setting up passive");
ftp.setConnectMode(FTPConnectMode.PASV);
log.debug("ASCII transfers");
ftp.setType(FTPTransferType.ASCII);
log.debug("change Directory");
ftp.chdir(strPath);
// get directory and print it to console
log.debug("Directory (*.*):");
String[] files = ftp.dir("*.*", false);
for (int i = 0; i < files.length; i++)
{
log.debug(files[i]);
}
log.debug("Quitting client");
ftp.quit();
</code>
The command dir() throws the following exception:
com.enterprisedt.net.ftp.ControlChannelIOException: Connection reset
at com.enterprisedt.net.ftp.FTPControlSocket.e(FTPControlSocket.java:1041)
at com.enterprisedt.net.ftp.FTPControlSocket.b(FTPControlSocket.java:1076)
at com.enterprisedt.net.ftp.FTPControlSocket.sendCommand(FTPControlSocket.java:1000)
at com.enterprisedt.net.ftp.FTPControlSocket.createDataSocketPASV(FTPControlSocket.java:830)
at com.enterprisedt.net.ftp.pro.ProFTPControlSocket.createDataSocketPASV(ProFTPControlSocket.java:156)
at com.enterprisedt.net.ftp.FTPControlSocket.a(FTPControlSocket.java:586)
at com.enterprisedt.net.ftp.FTPClient.setupDataSocket(FTPClient.java:2646)
at com.enterprisedt.net.ftp.FTPClient.a(FTPClient.java:3662)
at com.enterprisedt.net.ftp.FTPClient.dir(FTPClient.java:3754)
at com.enterprisedt.net.ftp.FTPClient.dir(FTPClient.java:3634)