blob: 3f62db6a95350c3e627eb03043cc46066ddd5a44 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
<title>Modifying the Ant classpath</title>
<meta name="keyword" content="ant">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>Modifying the Ant classpath</H1>
<p>When using an optional or custom task it is usually necessary to add extra
libraries to the classpath. The Ant classpath can be modified globally or per
launch configuration.
</p>
<p>To modify the Ant classpath globally:</p>
<ol>
<li>Click <b>Window &gt; Preferences</b>.</li>
<li>Expand <b>Ant</b> and select <b>Runtime</b>. If you are not on it
already, click the <b>Classpath</b> tab.</li>
<li>To add a JAR file to the classpath, click <b>Add Jar</b> and select the JAR file.</li>
<li>To add a folder to the classpath, click <b>Add Folder</b> and select the folder.</li>
<li>To remove an item from the classpath, select it and click <b>Remove</b>.</li>
<li>To restore the classpath to the default, click <b>Restore Defaults</b>.</li>
</ol>
<p>To modify the Ant classpath for a launch configuration:</p>
<ol>
<li>Click <b>Run &gt; External Tools &gt; External Tools...</b></li>
<li>Select the Ant configuration whose classpath you wish to modify</li>
<li>Select the <b>Classpath</b> tab</li>
<li>Uncheck the option to use the global classpath as specified in the preferences</li>
<li>To add a JAR file to the classpath, click <b>Add Jar</b> and select the JAR file.</li>
<li>To add a folder to the classpath, click <b>Add Folder</b> and select the folder.</li>
<li>To remove an item from the classpath, select it and click <b>Remove</b>.</li>
</ol>
<P><img border="0" src="../images/ngrelc.gif" alt="Related concepts" width="159" height="27"><br>
<a href="../concepts/concepts-antsupport.htm">Ant support</a><br>
<a href="../concepts/concepts-exttools.htm">External tools</a><br>
</P>
<p><img border="0" src="../images/ngrelt.gif" alt="Related tasks" width="159" height="27"><br>
<a href="./tasks-ant-running.htm">Running Ant buildfiles</a><br>
<a href="../tasks/tasks-exttools-running.htm">Running external tools</a><br>
</p>
<p>&nbsp;<br>
<a href="../hglegal2003.htm">
<img src = "../images/ngibmcpy2003.gif" alt="Copyright IBM Corporation and others 2000, 2003" border="0" width="324" height="14"></a>
</p>
</BODY>
</HTML>