I am currently developing a "debugger" java application that uses JDI to connect to an already running "target" java application. Is there any way to have Ant launch my target application then launch my "debugger" afterwards, while the first application is still running?
Yes I know that I can develop the JDI app to launch the target program, but that is not what I want right now.
You can spawn two java programs from within an Ant parallel task.
<parallel>
<sequential>
<java fork="true" classname="prog1 .... >
</sequential>
<sequential>
<sleep seconds="30"/>
<java fork="true" classname="prog2.... >
</sequential>
</parallel>
The sleep task in the second thread could be replace by a waitfor condition.