| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <HTML> |
| <HEAD> |
| |
| <meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." > |
| |
| <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 > 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 > External Tools > 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>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.png" alt="Related concepts" ><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.png" alt="Related tasks" ><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> |
| |
| |
| |
| </BODY> |
| </HTML> |