On Tue, 2 Jun 2026 15:08:07 GMT, Marius Hanl <[email protected]> wrote:
> What confuses me is that there are checks like `if (envStatus == > JNI_EDETACHED)` in e.g. `gtk/GlassApplication.cpp`. On the other hand > returning `JNI_ERR` and the comment `/* JNI version not supported */` while > `JNI_EDETACHED` could also be returned is also weird. `call_runnable()` in `gtk/GlassApplication.cpp` is called from `gtk_main()` on the GTK main-loop thread, which is always a JVM thread (see `GtkApplication.runLoop()`). The code that checks for a detached JVM is pointless, because even if for some reason this function were to be called on a native thread, it would still break JavaFX regardless of the defensive programming because it would call into JavaFX on a thread other than the event thread. ------------- PR Comment: https://git.openjdk.org/jfx/pull/2175#issuecomment-4605123518
