public void run(RestxShell shell) throws IOException, InterruptedException {
Path targetClasses = Paths.get(appSettings.targetClasses());
Path dependenciesDir = Paths.get(appSettings.targetDependency());
Path mainSources = Paths.get(appSettings.mainSources());
Path mainResources = Paths.get(appSettings.mainResources());
if (!compile.compile(shell, targetClasses, dependenciesDir, mainSources, mainResources, appClassName)) return;
shell.println("starting " + appClassName + "..." +
(daemon ? " - type `stop` to stop it and go back to restx shell" : ""));
vmOptions.add("-Drestx.app.package=" + appSettings.appPackage());
Process run = Apps.with(appSettings)
.run(shell.currentLocation().toFile(),
targetClasses, dependenciesDir, vmOptions,
appClassName, Collections.<String>emptyList(), quiet);
if (daemon) {
while (!shell.ask("", "").equals("stop")) {
shell.printIn("restx> unrecognized command - type `stop` to stop the app",
RestxShell.AnsiCodes.ANSI_YELLOW);
shell.println("");
}
run.destroy();
}
run.waitFor();
}