ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "DoNOTuseREPLY" <>
Subject Re: Exec in a new process
Date Fri, 14 Feb 2003 15:38:27 GMT
"Dominique Devienne" <>
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 (

// usage:  java execPlay02
public class ExecPlay02{
   public static void main(String zot[]) throws
      Runtime rT=Runtime.getRuntime();
      Process pC=null;
      String 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

         "mshearts" or "sol" or "freecell" or "winmine"
         "pbrush",   // an alternative "c:/program

View raw message