----- Original Message -----
From: "Boris Garbuzov" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 18, 2001 7:38 AM
Subject: Re: calling dos start


> I also have this problem. And I had it before ant sometimes in stand-alone
> applications saying
> Runtime.getRuntime().exec("mydoscommand");
> Try it in this simple mode first. But I would be curious to hear from
> specialists why java sometimes can not create runtime process. What it
depends
> on?
>

It depends on the underlying OS. (The following is true for Win2K)

The "start"-command is not a standalone command. It is included in the
cmd.exe To execute something using the start-command one needs to execute
"cmd /c start <mycommand>". In Ant this reads

<exec dir="." executable="cmd.exe">
  <arg value="/c"/>
  <arg value="start"/>
  <arg value="java"/>
  <arg value="${serverclass}"/>
</exec>

Nico


Reply via email to