<p>I'm trying to get a file with ant, using the get property. I'm running apache 2, and I can get the file from the indicated URL using wget and firefox, but ant gives me the following error:</p>

<pre><code>[get] Error opening connection java.io.IOException:
 Server returned HTTP response code: 503 for URL: http://localhost/jars/jai_core.jar
</code></pre>

<p>This is what I'm doing in my build.xml:</p>

<pre><code>&lt;get src="http://localhost/jars/jai_core.jar"
     dest="${build.dir}/lib/jai_core.jar"
     usetimestamp="true"/&gt;
</code></pre>

<p>Any idea what could be going wrong?</p>

<p><strong>EDIT:</strong> On to something. When I provide the full host name of my box instead of localhost, it works.</p>

503 is
Service Unavailable
, which probably means that the
```
src
```
URL isn't getting interpreted properly and sent by the ANT task or perhaps the JRE.
Here are some things to try:
As always, with ANT, execute the smallest possible build.xml with
-verbose
to see if that gives any more information,
-debug
for even more information.
Try the
```
verbose="true"
```
attribute on the task.
use "
http://127.0.0.1/jars/jai_core.jar
" - depending on what version of the java runtime ANT is executing under, 'localhost' may not be getting resolved correctly.
Drop the
```
usetimestamp
```
attribute just to see if it changes behavior.
Use another Java based application to try to perform the GET and compare results.