如果要在同一JVM中执行另一个JavaFX应用程序,则只需创建它的实例,然后手动创建
Stage并调用
Application#start()
public void runAnotherApp(Class<? extends Application> anotherAppClass) throws Exception { Application app2 = anotherAppClass.newInstance(); Stage anotherStage = new Stage(); app2.start(anotherStage);}注意:如果您在anotherApp中使用标准初始化的特殊功能(例如
Application.init(),
Application.getParameters()



