boolean (String[] params, Class<?> appClass) { try { //check in launch method for application class in the stack trace leads to this hack here Method launchApplication = Class.forName("com.sun.javafx.application.LauncherImpl") .getMethod("launchApplication", Class.class, String[].class); launchApplication.invoke(null, appClass, params); return true; } catch (Throwable e) { return false; } }