Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting java.lang.NoSuchMethodException: javafx.application.Platform.startup(java.lang.Runnable)

I have a tornadofx app that I've moved from an earlier version of Kotlin and Kotlin Coroutines to the latest (1.3 and 1.0.1) When I run it I get the above exception on this line

button("Click to calculate") {
}.setOnAction {
    GlobalScope.launch(Dispatchers.UI) { }
}

It's the call to 'launch' that causes the exception. This all worked in the release I was running on previously.

Any help would be appreciated

like image 914
Kevin Jones Avatar asked Jan 01 '26 14:01

Kevin Jones


1 Answers

This is a known bug. Either wait for 1.0.2 where it is hopefully fixed or downgrade to 1.0.0 at the moment where it still works. I did the latter and it suffices to update all the other stuff that needs to be updated (coroutines, etc.), in case you are coming from a pre-1.3-version.

like image 196
Roland Avatar answered Jan 03 '26 12:01

Roland



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!