Is it possible to disable JavaFX shutdown hook?
PavelTurk
pavelturk2000 at gmail.com
Thu Jul 25 15:43:25 UTC 2024
Hello all.
JavaFX adds its own shutdown hook. That gives many problems when it is necessary to work with application,
when system is shutting down, for example, if user presses CTRL+C. The first problem I described here -
https://bugs.openjdk.org/browse/JDK-8320923
Another problem is that after pressing CTRL+C JavaFX seems not to respond anymore. For example I've
observed that if after that we try to do Platform.runLater(() -> myCode is here), then myCode will never execute.
So, it is necessary to check in system, how it is shutting down, if it is. And this problem creates other problems.
Before opening a feature request, I decided to ask JavaFX developers, if it possible to disable JavaFX shutdown hook.
I mean, if there is no system property (something like javafx.shutdownhook.disabled), it will be added, but if I want
to call Platform.exit() manually I want to be able to disable JavaFX shutdown hook.
Best regards, Pavel
More information about the openjfx-dev
mailing list