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. Open the command link Ant > Runtime preference page.
  2. If you are not on it already, click the Classpath tab.

    Ant runtime classpath global preferences
  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 command link Run > External Tools > External Tools....
  2. Select the Ant configuration whose classpath you wish to modify
  3. Select the Classpath tab

    Ant launch configuration 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.
Ant support
External tools Running Ant buildfiles
Running external tools