ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin" <mgai...@hotmail.com>
Subject Re: Exec in a new process
Date Thu, 22 Aug 2002 18:55:53 GMT
Dominique:
if you want to kick a Windoze specific task with BelowNormal Priorty try:

String cmd[]={
"START /BELOWNORMAL"
"C:\\WINDOWS\\notepad.exe"
"ExecPlay02.java"
};

-Martin
----- Original Message -----
From: "DoNOTuseREPLY" <DoNOTuseREPLY@BusinessOmaha.com>
To: "Ant Users List" <ant-user@jakarta.apache.org>
Sent: Friday, February 14, 2003 11:38 AM
Subject: Re: Exec in a new process


> "Dominique Devienne" <DDevienne@lgc.com>
> Sent: Tuesday, January 21, 2003 10:14 AM
> Subject: RE: Exec in a new process
>
> >If anyone knows of a way to start a background process from Ant in
Windoze
> in a windoze-independent manner
>
> Though not "pure" ANT!  This might work for you if I understood the
issue -
> it does work for us.  At the end there are some of the generally existing
> winX that I diddled with that worked for examples.  Just replace the
String
> cmd[] elements with your own or one of the selections that are provided.
>
> jimS (info@kjs-a.com)
>
> // usage:  java execPlay02
> import java.io.IOException;
> public class ExecPlay02{
>    public static void main(String zot[]) throws
> IOException,InterruptedException{
>       Runtime rT=Runtime.getRuntime();
>       Process pC=null;
>       String cmd[]={
>          "notepad",
>          "ExecPlay02.java"
>          };
>
>          pC=rT.exec(cmd);
>          pC.waitFor();     // comment to return to prompt before done
>
>       } // end method main
> } // end class ExecPlay02
>
> // using . (dot) separating the folder/directories seemed to cause the
> // path to the current working directory to be appended to the path inside
> // the quotes
>
> // using .. (dot dot) seems to allow accessing a graphic when using paint
> that is
> // located in the parent directory
>
> // .exe located in c:\windows seem to be executed without a path
>
> /*
>          "notepad",
>          "a:/execPlay/execPlay02.txt"
> */
> /*
>          "winmine"
> */
> /*
>          "mshearts" or "sol" or "freecell" or "winmine"
> */
> /*
>          "pbrush",
> */
> /*
>          "pbrush",   // an alternative "c:/program
> files/accessories/mspaint"
>          "a:/ep/xxx.gif"
> */
> /*
>          "dialer"
> */
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>

Mime
View raw message