there is a process Process process = Runtime.getRuntime().exec(String.format("cmd /c %s", command ));

This process spawns other processes, for example, java ... is called from bat , which runs as another process.

If from the CMD console terminate, then all processes are stopped, if you execute process.destroy() , then the CMD stops, and the java process hangs.

How to get java "child" processes, which generates the essence of the process ?

  • one
    Pay attention to the answer to SO , in particular, to the part that is aware of what it’s not . So you may have stumbled upon the bug mentioned in this answer. - NikolayKondratyev
  • hmm maybe that's the problem. - Senior Pomidor

0