You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Pritesh saharey <pr...@sqatester.com> on 2003/03/05 07:50:22 UTC

why to use fork Attribute in java task

i would like to know the following 3 things 

1)when i run my build.xml file by using ant -v command i see this error in my konsole ??

	 [java] 'com.ora.ITS.SDK.Tools.ConsoleDistribBuilder'
     [java] '-f'
     [java] 'SRC/org/net/carmel/services/ptts/PTTService.distribdef'
     [java] '-o'
     [java] 'SRC/org/net/carmel/services/ptts/PTTService.distrib'
     [java]
     [java] The ' characters around the executable and arguments are
     [java] not part of the command.
	 
due to the following code iam using in my build file
	 
<target name="parcel" depends="init,compile"
		description="Creats parcel file">
		<java append="true" fork="true" failonerror="true" classpathref="classpath"
			classname="com.ora.ITS.SDK.Tools.ConsoleParcelBuilder">
			<arg line="-f SRC/org/net/carmel/services/ptts/PTTService.parceldef -o SRC/org/net/carmel/services/ptts/PTTService.parcel"/>
		</java>
</target>
<target name="distribute" depends="parcel">
		<java append="true" fork="true" failonerror="true" classpathref="classpath"
			classname="com.ora.ITS.SDK.Tools.ConsoleDistribBuilder">
			<arg line="-f SRC/org/net/carmel/services/ptts/PTTService.distribdef -o SRC/org/net/carmel/services/ptts/PTTService.distrib"/>
		</java>
	
		<move file="SRC/org/net/carmel/services/ptts/PTTService.distrib" todir="${build.distrib.dir}"/>
		
</target>	 

but when i run build file simply using ant command the build is successful altough using ant -v command also make my build successful but giving the error above i mentioned .

2)
<target name="init">
    <property environment="env"/>
  </target>
  if iam using environment property in my build file what changes will it make in my build file and can anybody tell why we should use this environment property
  
3)why fork Attribute is to be used with java task in ant  because after using fork only my build has stared running fine.

can anybody explain me.

_____________________________________________________________
Join SQAtester.com Community  ---> http://www.sqatester.com/testersarea/joinus.htm

_____________________________________________________________
Select your own custom email address for FREE! Get you@yourchoice.com w/No Ads, 6MB, POP & more! http://www.everyone.net/selectmail?campaign=tag