How to get shutdown hook to execute on a process launched from Eclipse

前端 未结 7 1512
天涯浪人
天涯浪人 2020-12-03 00:43

I have a shutdown hook in my application (created using Runtime.getRuntime().addShutdownHook). However if I launch the application from within Eclipse, when it

7条回答
  •  眼角桃花
    2020-12-03 01:06

    I'm not sure how to fix this but IntelliJ added a separate button to their 'Run' dialog which will shutdown the VM in a way that calls the Shutdown Hooks. Their debugger does not have this feature.

提交回复
热议问题