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

前端 未结 7 1528
天涯浪人
天涯浪人 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:17

    Sairam is right here, By calling System.exit(0) we can terminate eclipse JVM and can see Shutdown hook results

提交回复
热议问题