ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tek1 <t...@pobox.com>
Subject Re: forking new jvm in ExecuteJava?
Date Wed, 10 Apr 2002 09:28:09 GMT
thank you very much.

using execute rather than executeJava seemed to do the trick.



At 13:14 02/04/10 +1000, you wrote:
>On Wed, 10 Apr 2002 12:57, tek1 wrote:
> > hello.
> >
> > i've written a custom task that make a call to a third-party java .class.
> > unfortunately, that .class is calling System.exit(0) and stopping the
> > entire vm, which ant is running on.  how do i fork a new java vm within my
> > custom task for the third-party java .class to execute in?
> >
>
>You'll need to use CommandlineJava and Execute, rather than ExecuteJava:
>
>-  Create and configure an instance of CommandlineJava.  You configure it
>pretty much the same way as ExecuteJava - setClassname(), createClasspath(),
>createArgument(), etc.
>
>- Call getCommandline() to build the command-line.
>
>- Call static method Execute.runCommand() to execute the command.
>Alternatively, you can instantiate an Execute object, configure it manually,
>then call it's execute() method.
>
>--
>Adam


--
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