Thank you very much. That answered my question. I am using ant's manifestclasspath operator to build the manifest's class path. <!-- Libraries -->
<property name="lib.commons.cli" value="commons-cli-1.2.jar"/>
<property name="lib.jacob" value="jacob-1.14.3.jar"/>
<property name="lib.jtds" value="jtds-1.2.jar"/>
<property
name="lib.log4j" value="log4j.jar"/>
<property name="lib.scriptom" value="scriptom-1.6.0.jar"/>
<property name="lib.groovy" value="groovy-all-1.7.1.jar"/>
<path id="path.libraries">
<fileset id="libraries" dir="${dir.lib}/ext">
<include name="${lib.commons.cli}" />
<include name="${lib.groovy}" />
<include name="${lib.jacob}" />
<include name="${lib.jtds}"
/>
<include name="${lib.log4j}" />
<include name="${lib.scriptom}" />
</fileset>
</path>
<manifestclasspath property="jar.classpath" jarfile="${dir.lib}/${
ant.project.name}.jar">
<classpath>
<pathelement path="." />
<fileset refid="libraries"/>
</classpath>
</manifestclasspath>
<echo>jar.classpath: ${jar.classpath}</echo>
<target name="package"
depends="compile">
<jar jarfile="${dir.lib}/${
ant.project.name}.jar">
<manifest>
<attribute name="Class-Path" value="${jar.classpath}" />
<attribute name="Main-Class" value="Test" />
<attribute name="Built-By" value="${
user.name}"/>
<attribute name="Build-Time" value="${BuildTime}"/>
</manifest>
<fileset dir="${dir.bin}"/>
<fileset dir="${dir.config}"/>
</jar>
</target>