Any way to “reboot” the JVM?

后端 未结 8 1028
难免孤独
难免孤独 2020-12-05 17:46

Is there any way to reboot the JVM? As in don\'t actually exit, but close and reload all classes, and run main from the top?

8条回答
  •  醉话见心
    2020-12-05 18:07

    I do something similar using JMX, I will 'unload' a module using JMX and then 'reload' it. Behind the scenes I am sure they are using a different class loader.

提交回复
热议问题