Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7937275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:29:13+00:00 2026-06-03T22:29:13+00:00

Can someone please help with instructions for a workaround on the Apache Ant installation

  • 0

Can someone please help with instructions for a workaround on the Apache Ant installation bug in Windows?

The snippet below describes one of three workarounds. If you are able to successfully get one of these to work, can you please share?

https://bugs.java.com/bugdatabase/view_bug?bug_id=7077696

(1) Run with -Djava.net.preferIPv4Stack=true

  • add a firewall exception for the Java binary.

(2) Run with -Djava.net.preferIPv4Stack=true (which disables IPv6 and uses
AF_INET sockets exclusively)

(3) Or disable stateful FTP inspection in the firewall (registry setting or netsh command)

============

Setup:

Install Apache Ant:

  • download binary files at http://ant.apache.org/

  • navigate to this path for installation instructions: Manual > Installing Apache Ant > Getting Ant > ..follow instructions

  • move the extracted folder (containing the bin folder) inside of C:\source_code\apache-ant-1.8.3\ or directory used in %ANT_HOME% environment variable

  • Windows 7 > Control Panel > System > click "Environment Variables" button >

(remove the trailing "" character on the environment variables)

  • under the "System Variables" section, click "Add" > Variable Name: JAVA_HOME Variable Value: C:\Program Files\Java\jdk1.7.0_02

  • under the "System Variables" section, click "Add" > Variable Name: ANT_HOME Variable Value: C:\source_code\apache-ant-1.8.3

  • under the "System Variables" section, click "Path" environment variable, click "Edit" > Variable Name: Path Variable Value: {value before editing};%JAVA_HOME%\bin;%ANT_HOME%\bin;

  • restart command prompt (Run As Administrator)

  • make sure Windows sees Apache Ant:

    C:\source_code\apache-ant-1.8.3>ant -version
    Apache Ant(TM) version 1.8.3 compiled on February 26 2012

  • navigate to http://ant.apache.org/ > Manual > Installing Apache Ant > Install Ant >

========================

FTP Bug:

C:\source_code\apache-ant-1.8.3>ant -f fetch.xml -Ddest=system
Buildfile: C:\source_code\apache-ant-1.8.3\fetch.xml

pick-dest:
     [echo] Downloading to C:\source_code\apache-ant-1.8.3\lib

...

-fetch-netrexx:
      [ftp] getting files

BUILD FAILED
C:\source_code\apache-ant-1.8.3\fetch.xml:325: The following error occurred whil
e executing this line:
C:\source_code\apache-ant-1.8.3\fetch.xml:144: java.net.SocketException: Permiss
ion denied: recv failed
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:150)
        at java.net.SocketInputStream.read(SocketInputStream.java:121)
        at java.io.BufferedInputStream.read1(BufferedInputStream.java:273)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
        at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
        at org.apache.commons.net.telnet.TelnetInputStream.__read(TelnetInputStr
eam.java:114)
        at org.apache.commons.net.telnet.TelnetInputStream.run(TelnetInputStream
.java:535)
        at java.lang.Thread.run(Thread.java:722)

Total time: 3 seconds

C:\source_code\apache-ant-1.8.3>

==============

I’ve tried making an inbound and outbound Windows Firewall rule to allow this program through.

%ProgramFiles%\Java\jdk1.7.0_02\bin\java.exe

I’ve also tried running the command with the parameter they mention in the workaround.

C:\source_code\apache-ant-1.8.3>ant -f fetch.xml -Ddest=system -Djava.net.preferIPv4Stack=true
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T22:29:14+00:00Added an answer on June 3, 2026 at 10:29 pm

    Ran this from the Windows command prompt (Run As Administrator) as a workaround to disable stateful FTP filtering so that Windows Firewall will not block FTP traffic.

    netsh advfirewall set global StatefulFtp disable
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can someone please help me, I have this xml snippet <?xml version=1.0 encoding=utf-8 ?>
Can someone please help me get my head around this bug? With Firefox its
Can someone please help me to merge the consecutive duplicate status rows into one.
Can someone please help quickly mute or unmute the stage volume in Flash CS3
can someone please help me. why does this return an error: Dim stuff As
Can someone please help me with using Regex with NSPredicate? NSString *regex = @(?:[A-Za-z0-9]);
Can someone please help me out with a JavaScript/jQuery solution for this arithmetic problem:
Can someone please help me figure out a way to achieve the following (see
Can someone please help me to force my website to redirect to using www.
Could someone please help explain why I can't get this to work? I properly

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.