java - ant jdb return immediately from a task -
i'm wanting utilize ant run class , debugger (jdb) or other way round
whichever way round need 1 homecoming other needs attach...
here's 2 tasks i'm working on @ moment... (where debug target run)
<target name="run-debug-target" depends="compile" > <java fork="true" classname="uk.co.bedroomcoders.ple.desktop.desktoplauncher" classpath="bin:libs/gdx-backend-lwjgl.jar:libs/gdx-backend-lwjgl-natives.jar:libs/gdx.jar:libs/gdx-natives.jar" > <jvmarg line="-agentlib:jdwp=transport=dt_socket,address=localhost:6000,server=y,suspend=y" /> </java> </target> <target name="debug" depends="run-debug-target" description="debugs project compiling if needed" > <exec spawn="true" executable="jdb"> <arg value="-listen" /> <arg value="localhost:6000"/> </exec> </target>
https://ant.apache.org/manual/tasks/java.html
see spawn property:
if enabled allows start process outlive ant. requires fork=true, , not compatible timeout, input, output, error, result attributes.
so..
<java fork="true" spawn="true" classname="uk.co.bedroomcoders.ple.desktop.desktoplauncher" classpath="bin:libs/gdx-backend-lwjgl.jar:libs/gdx-backend-lwjgl-natives.jar:libs/gdx.jar:libs/gdx-natives.jar" > <jvmarg line="-agentlib:jdwp=transport=dt_socket,address=localhost:6000,server=y,suspend=y" /> </java> in way, <java> task start new java process running java class , homecoming without waiting process return.
java ant jdb
No comments:
Post a Comment