Netbeans, JRE7 and Windows firewall

JRE7 has been released, and a big part of this is support for IPv6.It seems this does not play nice with FTP operations that run via the new Java Runtime.

After updating to JRE7, when you attempt FTP operations within Netbeans (tested on 7.3 RC2), you may see the follow error and failure:

[code]Because NetBeans is running on Windows and JDK 7, you might be facing a problem with FTP operations. Ensure that Windows built-in firewall does not block JDK 7 binaries.[/code]

There are various ways to get around this, but the simpliest is to open a CMD window as administrator and simply enter this command:

[code]netsh advfirewall set global StatefulFTP disable[/code]

You should get a confirmation “Ok.” from the console. In which case you can head over to Netbeans and try the FTP operation from scratch again.

16 thoughts on “Netbeans, JRE7 and Windows firewall

    • Hi Ricardo. Just last night I got this message again and the above fix didn’t do anything despite saying “OK”.

      I found that the exact same message appears when FTP credentials are incorrect. In my case it was my host. I was using “”. But changing it to “” resolved my issue.

      In this case, it’s odd that netbeans didn’t supply are detailed message about the connection settings than point me in the direction of this again.

      Check your ftp credentials, particularly the host.

  1. These worked for me
    – Close Netbeans if open
    – Run cmd as Administrator,
    – Run the command : netsh advfirewall set global StatefulFTP disable
    – Run the netbeans as Administrator

    All works perfect.

  2. Thank you for the Help ‘Aaron Cooper’.

    To all readers => You may need to make sure the Proxy Settings are ‘Use System Proxy’ as it may cause some issues as well when connecting to FTP.

    Good Luck πŸ™‚

  3. Pingback: Cant connect with FTP on NetBeans 8 | Solutions for enthusiast and professional programmers

  4. Thanks for this tip!

    I’m just wondering about potential side effects when disabling the firewall permanently for this specific issue.
    Might there be a security risk because not only Netbeans but also other programs could use (and misuse) this unprotected port?

    Sorry if that’s a dumb question, I don’t really know anything about these things and just want to make sure it’s safe. (So far I was able to make it work when disabling my Windows firewall completely which is way worse for sure πŸ˜‰ ).

Leave a Reply

Your email address will not be published. Required fields are marked *