How do I stop a process running in IntelliJ such that it calls the shutdown hooks?

前端 未结 2 842
再見小時候
再見小時候 2020-11-29 06:05

When I run my program in IntelliJ then use the STOP button, it does not call my shutdown hooks that I\'ve created. Is there a way in IntelliJ to have those called on shutdow

2条回答
  •  再見小時候
    2020-11-29 06:51

    If you are on Mac (and I assume Linux), get the pid and use kill from the terminal. It's an extra step, but works to debug the shutdown handler when you need to.

提交回复
热议问题