ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <>
Subject Re: build from java program
Date Mon, 08 Jun 2009 10:13:24 GMT
divyanshu singh wrote:
> hi i want to use java program to build ant files
> so is there a way to run build command through java program which is
> platform independent
> will exec command will work on any platform i mean without changing any
> thing in the java code
do you mean you want to exec() ant? You don't need to do that, you can 
run Ant directly in your process. It makes you more vulnerable to memory 
leaks in any tasks you use (hint: javac does this so fork it), but gives 
you good control and error handling. You can even interrupt a build.

for some sample code, look at


Steve Loughran        
Author: Ant in Action 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message