阅读背景:

JAVA:如何在进程停止时调用方法(甚至可能吗?)

来源:互联网 

I want it so when my users start my program from the command line and then kill the process (ctrl+c, for example) the program will shutdown gracefully by closing all its connections. Is this even possible? I can't just have it call a method upon closing like a GUI can? This program has no GUI.I want it so when my users start my program fro




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: