You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ray Tayek <rt...@comcast.net> on 2005/10/24 09:33:51 UTC

how to add a single class (or a few classes) to the classpath

hi, trying to make the following fragment work

<target name="runusingjar" depends="jar" description="runusingjar">
         <java classname="Main">
                 <classpath>
                         <fileset file="${bin}/src/Main.class"/>
                         <fileset dir="${bin}/src" includes="Main.class"/>
                         <filelist dir="${bin}/src" files="Main.class"/>
                         <path refid="lib" />
                         <pathelement 
path="${dist}/${ant.project.name}-${DSTAMP}.jar"/>
                 </classpath>
         </java>
</target>

the purpose of this is to just run the jar from main in the default 
package. but the class files are under bin/package and one wants to exclude 
them and use the stuff in the jar.

none of the obvious ways seem to work (see above fragment).

how does one specify a small set of class files (excluding stuff in sub 
directories)?

is there a better way to do this? (i.e. compile the stuff in the default 
package into bin/default or something like that).

any pointers will be appreciated.

thanks

---
tayek.com


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org