When I run a java task that is a console app that prompts for inputs, I get no prompts, have to enter the data in what I hope is the correct sequence, and when the program ends it spits out a block of all the accumulated prompts. Is there a way around this?
I've tried the code below with fork="true" and fork="false" as well. (I thought it should be true, but it came to me this way.) I've also made a halfhearted attempt at using exec, which also did not work the way I want. And, I also tried to exec the command I can type into a console window to get a new command window instance (start), but apparently that isn't a real command represented by an exe or cmd file.
Do not use "fork" - it runs the Java app in another VM and that VM will not have access to your console and thus cannot get any input.
Without 'fork', you should be able to enter console text. But there is a slight gotcha - any prompts needs to use println (and not print) or else the prompts will not show up until after you enter the input!
You could also look into the 'input' attribute of the java task - it lets you provide canned responses in a text file.