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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to