Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get the exit code of a ProcessHandle in Java 10

Tags:

java

process

In Java 10, it seems to be impossible to get the exit code of a process referenced by a ProcessHandle after calling onExit whereas we can get it from a Process.

Do you confirm?

like image 912
Yannick le goc Avatar asked Apr 29 '26 20:04

Yannick le goc


1 Answers

Yes, that is right. You can obtain an exit code of a process only if you created it yourself

like image 75
Sammers Avatar answered May 01 '26 10:05

Sammers



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!