I am using ant
to trigger my java process using <exec>
. A exact ant target written similar to below
<target>
<exec dir="${dir}" executable="${root}/rcc" failonerror="true" resultproperty="exit.code">
</exec>
</target>
Inside <exec>
I am also passing few arguments using <arg>
. It was perfectly working when I was using java-8 in rcc
but after upgrade to java-11 it was stop working when process return exit code 1
while it still working when process return exit code 0. In case of return code 1 ant process remain stucked.
A strange part is it works perfectly fine when rcc
process return successfully with code 0
I have tried by placing -Djdk.lang.Process.launchMechanism=fork
without any luck. Can you please help to understand what could be the problem and solution to it?
I using ant version 1.9.4
and running on RHEL 8.10