Calling ant from Java in a loop
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Noel_Scheaffer
Posted On:   Tuesday, July 2, 2002 12:59 PM

I am trying to call an ant script in a for loop from within a Java program. It make one call just fine, but does not return control to my Java program for further iterations through the loop.

Here is a code snippet...

			

String[] antCommandParams = new String[2];

antCommandParams[0] = "-Dfiletype=" + currentDirectory;

antCommandParams[1] = "-Ddatafile=" + datafiles[j];

Main.start(antCommandParams, null, null);


After the call to Main.start execution is terminated.

Any thoughts?

Thanks!

Re: Calling ant from Java in a loop

Posted By:   Noel_Scheaffer  
Posted On:   Tuesday, July 2, 2002 03:03 PM

I found my own answer in the source code, Main.java. A "System.exit()" command is called, which kills the current JVM. Oh well.
About | Sitemap | Contact