JDK 7 With Netbeans: FTP Problem With Windows Firewall

Yesterday I installed Netbeans to my Windows PC and tried to add a remote PHP project. I want to say that 1 day before, I installed same version of Netbeans to my Mac and added the remote project, there were no issues.

But yesterday, I was unable to add remote project, no matter what I tried, it was unable to add, giving the error that there is no file on the remote folder. The connection was tested and working too.

So I tried to disable Windows Firewall and ta-dah! It worked. What confused me is that first time I opened Netbeans, it warned me that there might be issues with Windows Firewall and prompted the classic Firewall pop-up to me to either allow or block the application, and I allowed. But it still was unable to get through.

Some searches guided me that that was a problem with JDK 7 and some people downgraded to JDK 6 were able to connect FTP folder.

But I didn’t want to downgrade because it was loooking too unnecessary to me. I mean, this is JDK and Netbeans, seriously, no solutions?

Anyway, I was too sleepy to fight with firewalls or libraries at that moment, I slept. This morning, with a fresh brain, I found out that “The only difference between JDK7 and older releases is that the JDK is using IPv6 sockets when IPv6 is enabled and so IPv4-mapped IPv6 addresses are used. it may be that Windows or the firewall is not configured to allow IPv6 sockets.”(1)

And there was a command that worked for some people(2). I tried, it worked for me, too.

What you have to do is open MS-DOS with administrator rights and paste this, hit enter. Probably, it will work for you, too. Hope so.

netsh advfirewall set global StatefulFTP disable

(1) Source Link
(2) Source Link

  • Alexander

    Thanks, that works for me too.

  • Glad you could solved it out.

  • Yuri

    Dude. THANKS.

  • Rambow

    Thanks So Much

    • My pleasure, thank you for your comment.

  • cesar

    thanks so much….
    it works for me…. just perfect

    • You’re welcome, Cesar. Thanks for your comment.

  • MC Emperor

    Like a boss!

  • daviunx

    Nicee post! Thanks!!

  • Requiem

    Saved me a big headache! Thanks man! :)

    • Sure, you’re welcome ;-)

  • Jan

    You made my day! Couldn’t create remote PHP project due to this FTP/JDK/Firewall issue. Thanks for the command line.

  • adi

    thanks bro, thats work for me to.

  • thanks for your comments, you are welcome my friends.

  • Janos Sabo

    Thanks for a quick, easy and fast solution.

    • Hi @Janos,
      Thank you for your comment. I’m glad it worked.

  • Jose Alberto

    Muchisimas Gracias, Funcionó de maravilla ….

  • Riverspart

    Excellent!

  • Hey thankyou ^^

  • Thank you very much!
    Worked like charm!

  • It works like a charm, many thanks.

  • Onin

    Great post!

    Thanks a lot.

  • Ares

    Yep, thanks dude!!!