System. In java thread exit

My main thread created a new thread

PS. the new thread will call other Jar file, so I can't modify it

Solution

You can't

Terminates the currently running Java virtual machine This parameter is used as the status code; By convention, a non - zero status code indicates an abnormal termination

This is Javadoc

Therefore, this method will terminate the entire JVM Not just threads

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>