<p>Right now my ant task looks like.</p>

<pre><code>&lt;javadoc sourcepath="${source}" destdir="${doc}"&gt;
    &lt;link href="http://java.sun.com/j2se/1.5.0/docs/api/" /&gt;
&lt;/javadoc&gt;
</code></pre>

<p>And I'm getting this warning:</p>

<pre><code>javadoc: warning - Error fetching URL: http://java.sun.com/j2se/1.5.0/docs/api/package-list
</code></pre>

<p>How do I get the javadoc to properly link to the API?  I am behind a proxy.</p>

You probably need the
http.proxyHost and http.proxyPort system properties
set. For example,
```
ANT_OPTS="-Dhttp.proxyHost=proxy.y.com" ant doc
```
Alternatively, you could set the "offline" flag and provide a package list, but that could be a pain for the Java core.