We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2fba3a commit 5557245Copy full SHA for 5557245
ui/kotlinx-coroutines-javafx/src/JavaFx.kt
@@ -4,7 +4,6 @@
4
5
package kotlinx.coroutines.experimental.javafx
6
7
-import com.sun.javafx.application.*
8
import javafx.animation.*
9
import javafx.application.*
10
import javafx.event.*
@@ -86,5 +85,9 @@ class ApplicationThreadChecker : BlockingChecker {
86
85
}
87
88
internal fun initPlatform() {
89
- PlatformImpl.startup {}
90
-}
+ // Ad-hoc workaround for #443. Will be fixed with multi-release jar.
+ // If this code throws an exception (Java 9 + prohibited reflective access), initialize JavaFX directly
+ Class.forName("com.sun.javafx.application.PlatformImpl")
91
+ .getMethod("startup", java.lang.Runnable::class.java)
92
+ .invoke(null, java.lang.Runnable { })
93
+}
0 commit comments