blob: 09d239ec521a5b9e5cd40fc98b05f8f0c70e26a0 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang="en">
<HEAD>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2011. 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">
<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"> </script>
</HEAD>
<body>
<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>Open the
<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.ant.ui.AntRuntimePreferencePage)")'>
<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="command link">
<b>Ant &gt; Runtime</b></a> preference page.</li>
<li>If you are not on it already, click the <b>Classpath</b> tab.
<br><br>
<img src="../images/ant_runtime_classpath.png" alt="Ant runtime classpath global preferences" border="0" >
</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
<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.externalTools.commands.OpenExternalToolsConfigurations")'>
<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="command link">
<b>Run &gt; External Tools &gt; External Tools...</b></a>.</li>
<li>Select the Ant configuration whose classpath you wish to modify</li>
<li>Select the <b>Classpath</b> tab
<br><br>
<img src="../images/ant_classpath_tab.png" alt="Ant launch configuration classpath tab" border="0" >
</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>