Javafx Platform.runLater never running Javafx Platform.runLater never running multithreading multithreading

Javafx Platform.runLater never running


Ok, I have found the solution to this!

If you run into any situation where all of your scenes end, the thread managing all of this will just peter out. To prevent this from happening, add this line before Platform.runLater:

Platform.setImplicitExit(false);Platform.runLater(()->System.out.println("Inside Platform.runLater()"));

So long as this runs before the last scene ends, it will keep the thread alive, and you will not run into the problem of runLater() failing!