最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Issue with ant to exit when java process return code 1 - Stack Overflow

programmeradmin5浏览0评论

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

发布评论

评论列表(0)

  1. 暂无评论