ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "suogen" <sigar_ch...@hotmail.com>
Subject Re: how to run java.exe in the different process (not thread) respectively?
Date Wed, 21 Aug 2002 02:22:32 GMT
Conor,

Thanks for your suggestion!


my build.xml as follow:

<target name="runserver" depends="compile">
     <java classname="MyServer" fork="yes" failonerror="true">
      </java>
 </target>

 <target name="runclient" depends="compile">
     <java classname="MyClient" fork="yes" failonerror="true">
      </java>
 </target>

<target name="runall" depends="runserver, runclient" />

when the server has start, it will block untill the client to connect to it.
so when i run "runall" target,
it will be blocked, the client will not run. i want the client and server
can run in different process (like
in console to run start ...), how can i achieve it in the ant?

thaks in advance.

Sigar

----- Original Message -----
From: "Conor MacNeill" <conor@cortexebusiness.com.au>
To: "Ant Users List" <ant-user@jakarta.apache.org>
Sent: Monday, August 19, 2002 6:35 PM
Subject: Re: how to run java.exe in the different process (not thread)
respectively?


> suogen wrote:
> > Hi all,
> >
> > I am newbie to the ant, I think this question may have been asked
before, but I search the messages, i don't think
> > I have got the result i expected.
> >
> > I can use <parallel> to achieve it in different thread, but not process:
> >
> > <target name="runall">
> >     <parallel>
> >         <antcall target="runserver">
> >         <sequential>
> >             <sleep seconds=10" />
> >             <antcall target="runclient">
> >         </sequential>
> >     </parallel>
> > </target>
> >
> > how to run the server and client in different process, any help are
appreciated.
> >
> >
>
> Not knowing how runserver and runclient operate, one could only guess.
> If these are implemented as <java> tasks, then simply set fork="yes" to
> run within a different VM.
>
> Conor
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
>

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


Mime
View raw message