Error:
Uncaught exception thrown in Thread[main,5,main]
IllegalAccessError: superinterface check failed: class com.jayfella.jme.jfx.injme.JmeFxHostInterface (in unnamed module @0x30f621f7) cannot access class com.sun.javafx.embed.HostInterface (in module javafx.graphics) because module javafx.graphics does not export com.sun.javafx.embed to unnamed module @0x30f621f7
Class Code:
import com.jayfella.jme.jfx.JavaFxUI;
import com.jme3.app.SimpleApplication;
import com.jme3.app.StatsAppState;
import javafx.scene.control.Button;
import javafx.fxml.FXMLLoader;
public class Main extends SimpleApplication {
public static void main(String[] args) {
Main main = new Main();
main.start();
}
Main() {
super(new StatsAppState());
}
@Override
public void simpleInitApp() {
try {
JavaFxUI.initialize(this);
Button btn_test = new Button("Click me");
JavaFxUI.getInstance().attachChild(btn_test);
} catch (Exception e) {
System.err.println(e);
}
flyCam.setDragToRotate(true);
}
}