ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Stockall <je...@cryptocard.com>
Subject Re: How to set classpath in java task
Date Mon, 03 Mar 2003 12:47:37 GMT
On Monday, March 3, 2003, at 07:34  AM, Pritesh saharey wrote:

> hi everybody,
>
> <target name="distribute" depends="init,compile"
> 		description="Creats distribe file">
> 		<java append="true"
> 			classname="com.org.ITS.SDK.Tools.ConsoleParcelBuilder">
> 			<arg line="-f SRC/org/net/carmel/services/ptts/PTTService.parceldef 
> -o PTTService.parcel" />
> 			<classpath >
> 				<pathelement location="../seclusion/*.jar"/>
> 				<pathelement location="../seclusion/*.parcel"/>
> 				
> 			</classpath>
> 		</java>
> 		<java append="true"
> 			classname="com.org.ITS.SDK.Tools.ConsoleParcelBuilder">
> 			<arg line="-f 
> SRC/org/net/carmel/services/ptts/PTTService.distribdef -o 
> PTTService.distrib" />
> 			<classpath >
> 				<pathelement location="../seclusion/*.jar"/>
> 				<pathelement location="../seclusion/*.parcel"/>
> 				
> 			</classpath>
> 			  <move file="PTTService.distrib" todir="${build.distrib.dir}"/>
> 		</java>
> </target>
>
> in above code
> 				<pathelement location="../seclusion/*.jar"/>
> 				<pathelement location="../seclusion/*.parcel"/>

<!-- snip -->

> so what should i do now can any body help me out

Define your a path like this outside of your <java> task

<path id="classpath">
	<fileset dir="../seclusion">
      	<include name="*.jar"/>
      	<include name="*.parcel"/>
      </fileset>
</path>

Then in your <java> task reference it like this:

<java classname="foo"
       classpathref="classpath"/>

Jesse Stockall - jesse@cryptocard.com
CRYPTOCard Corp.


Mime
View raw message