ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Ant and LaTeX
Date Fri, 03 Nov 2000 16:37:37 GMT
>>>>> "KA" == Klaus Alfert <> writes:

 KA> My problem was that I want to change the directory before tex is
 KA> called. The easiest way was just to use the new API - I just
 KA> didn't recognize that this call is not the older API.

This is exactly what Execute tries to hide. Basically you do something

  // Create an Execute instance and make sure output gets to Ant's
  // logging system. No timeout.
  Execute execute = 
    new Execute(new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN), null);


  // set your working directory
  // allow Ant to find the antRun script if necessary

  // run your command
  exitValue = execute.execute();

This will go a long way to avoid using a helper script (antRun does a
cd dir and than invokes the command), taking special measures on JDK
1.3, MacOS (where you can change user.dir), Windows NT/2000 and OS/2.


View raw message