sustain/src/main/java/net/happyonroad/component/container/AppLauncher.java
public void start() throws Exception {
        try {
            long start = System.currentTimeMillis();
            //Ensure there is no legacy signal files
            FileUtils.deleteQuietly(getSignal("exit"));
            FileUtils.deleteQuietly(getSignal("exiting"));
            logger.info(banner("Loading components starts from {}", this.mainComponent));
            environment.load(this.mainComponent);
            logger.info(banner("Loaded  components starts from {}", this.mainComponent));
            if (!StringUtils.isEmpty(System.getProperty("app.port")))
                exportAsRMI();

            addShutdownHook();
            logger.info(banner("The {} is started", getAppName()));
            logger.info(banner("System starts took {}", formatDurationHMS(System.currentTimeMillis() - start)));
            //Thread.currentThread().setDaemon(true);
            //让主线程基于STDIO接受交互命令
            //以后应该让CLI组件托管这块工作
            //if (!StringUtils.isEmpty(System.getProperty("app.port")))
            //    processCommands();
            if (StringUtils.isEmpty(System.getProperty("app.port")))
                checkSignalPeriodically();
        } catch (Exception ex) {
            logger.error("Failed to start", ex);
            System.exit(1);
        }
    }
public void start() throws Exception {
        try {
            long start = System.currentTimeMillis();
            //Ensure there is no legacy signal files
            FileUtils.deleteQuietly(getSignal("exit"));
            FileUtils.deleteQuietly(getSignal("exiting"));
            logger.info(banner("Loading components starts from {}", this.mainComponent));
            environment.load(this.mainComponent);
            logger.info(banner("Loaded  components starts from {}", this.mainComponent));
            if (!StringUtils.isEmpty(System.getProperty("app.port")))
                exportAsRMI();

            addShutdownHook();
            logger.info(banner("The {} is started", getAppName()));
            logger.info(banner("System starts took {}", formatDurationHMS(System.currentTimeMillis() - start)));
            //Thread.currentThread().setDaemon(true);
            //让主线程基于STDIO接受交互命令
            //以后应该让CLI组件托管这块工作
            //if (!StringUtils.isEmpty(System.getProperty("app.port")))
            //    processCommands();
            if (StringUtils.isEmpty(System.getProperty("app.port")))
                checkSignalPeriodically();
        } catch (Exception ex) {
            logger.error("Failed to start", ex);
            System.exit(1);
        }
    }
启动当前的组件Jar包