In Java 8 I can launch a JavaFX application with a preloader using the following method:
LauncherImpl.launchApplication(WindowMain.class, WindowMainPreloader
from jdk 9, LauncherImpl not work jdk 10 - java.graphics module-info.java
all classes in package com.sun.javafx.application exported to special modules (java.base,javafx.controls,javafx.deploy,javafx.swing,javafx.web),
So if you add module (javafx.graphics) in your module its not work,
so use : System.setProperty("javafx.preloader",path_class_loader) as an alternative to LauncherImpl for jkd 9 and above