- Method start = launcherClass.getDeclaredMethod("start",
- new Class<?>[] { Boolean.class, List.class });
- start.invoke(launcherClass.newInstance(), textMode, files);
+ Constructor<?> cons = launcherClass.getConstructors()[0];
+ Object instance = cons.newInstance(textMode, files);
+ Method start = launcherClass.getDeclaredMethod("start");
+ start.invoke(instance);