/** * A convenience shortcut for the tests that are interested in command outcome, not in the runtime state. This * code is equivalent to <code>createRuntime().run()</code>. * * @return an outcome of the application command. * @since 0.25 */ public CommandOutcome run() { return createRuntime().run(); } }
public void start() { this.executor.submit(() -> outcome = runtime.run()); checkStartupSucceeded(startupTimeout, startupTimeoutTimeUnit); }
Runtime.getRuntime().addShutdownHook(shutdownThread); try { o = createRuntime().run();
/** Run the batch compiler. * * <p>This function runs the compiler and exits with the return code. * * @param args the command line arguments. * @return the exit code. */ public int runCompiler(String... args) { try { final BQRuntime runtime = createRuntime(args); final CommandOutcome outcome = runtime.run(); if (!outcome.isSuccess() && outcome.getException() != null) { Logger.getRootLogger().error(outcome.getMessage(), outcome.getException()); } return outcome.getExitCode(); } catch (ProvisionException exception) { final Throwable ex = Throwables.getRootCause(exception); if (ex != null) { Logger.getRootLogger().error(ex.getLocalizedMessage()); } else { Logger.getRootLogger().error(exception.getLocalizedMessage()); } } catch (Throwable exception) { Logger.getRootLogger().error(exception.getLocalizedMessage()); } return Constants.ERROR_CODE; }
Runtime.getRuntime().addShutdownHook(shutdownThread); try { o = createRuntime().run();