Java 7 prevents FTP transfers on Windows Vista and 7.
In FTP, before a file is transferred a PORT or a PASV command must be sent. As soon as one of the commands is
I had the same problem using IDE Eclipse Neon, JAVA 7 and Windows 7 Professional. Trying to upload a PDF file to an FTP server. I solved it by running the following command in CMD as administrator:
C: \ Users \ pc01> netsh advfirewall set global StatefulFTP disable
Blogged about the issue here: http://podzemski.com/2011/09/12/java-7-prevents-ftp-transfers-on-windows-when-firewall-is-on/
Maybe it'll cause some additional awareness of the problem.
The same bug was reported here with a test case: Java 7 Socket Exception Bug forum. Its an issue with Java 7
The problem is caused by the stateful FTP filter of the firewall. As a workaround you can disable it by executing netsh advfirewall set global StatefulFTP disable
with administrator rights.
Another workaround is to start the JVM with:
-Djava.net.preferIPv4Stack=true
This problem can be demonstrated without JDK7, it's the firewall in Windows 7 blocking the ftp protocol when the application is using IPv6-mapped IPv4 addresses. See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7077696 for more details and workarounds.