Hello Peter, Thanks for your response. I do not have input attribute set for the java task. My java program expects user input from the console. My ant task is as below: <target name="generate" description="Execute the java class file"> <java classname="com.config.utilities.ConfigUtilityTool" classpathref="run.classpath" fork="true"></java> </target>
Tried with both options for fork attribute but no success.
I think that your problem may be that the program is not hanging, just that it didn't print the prompts and is waiting for input from the console.
Try entering the data that the prompts would expect and see what happens. When I run a program that asks for about 20 values, I have to enter them all with no prompts, and then when I am done I get a flood of all 20 prompts in a row followed by the rest of the output written after that. It seems that Ant buffers everything the java program prints and dumps it to the console when the java task is done.