Modifying the Ant classpath

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.

To modify the Ant classpath globally:

  1. Click Window > Preferences.
  2. Expand Ant and select Runtime. If you are not on it already, click the Classpath tab.
  3. To add a JAR file to the classpath, click Add Jar and select the JAR file.
  4. To add a folder to the classpath, click Add Folder and select the folder.
  5. To remove an item from the classpath, select it and click Remove.
  6. To restore the classpath to the default, click Restore Defaults.

To modify the Ant classpath for a launch configuration:

  1. Click Run > External Tools > External Tools...
  2. Select the Ant configuration whose classpath you wish to modify
  3. Select the Classpath tab
  4. To add a JAR file to the classpath, click Add Jar and select the JAR file.
  5. To add a folder to the classpath, click Add Folder and select the folder.
  6. To remove an item from the classpath, select it and click Remove.

Related concepts
Ant support
External tools

Related tasks
Running Ant buildfiles
Running external tools