App.java 文件源码

java
阅读 27 收藏 0 点赞 0 评论 0

项目:fwm 作者:
public static void main(String[] args) throws Exception {       
    // PRODUCTION mode needs to be determined before we get here... 
    AppConfig.firstInit();
    prod = AppConfig.getProd();
    appFileUtil = new AppFileUtil();
    if(!appFileUtil.success()){
        System.err.println(appFileUtil.getErrorMessage());
        Platform.runLater(new Runnable(){
            public void run(){
                Alert al = new Alert(AlertType.ERROR);
                al.setResizable(true);
                for(Node n : al.getDialogPane().getChildren()){
                    if(n instanceof Label){
                        ((Label)n).setMinHeight(Region.USE_PREF_SIZE);
                    }
                }
                al.setContentText(appFileUtil.getErrorMessage());
                al.setHeaderText("FWM Startup Error");
                al.showAndWait();
                System.exit(-1);
            }
        });
        return;
    }
    // ignore everything else because this means that we're in a jar file, so the app won't work
    // if it doesn't think that we're prod. 
    PropertyConfigurator.configure(appFileUtil.getLog4JFile().getAbsolutePath());
    AppConfig.init();
    HotkeyController.init();
    log.debug("Currently prod? "  + prod);
    log.debug(retGlobalResource("/src/main/webapp/WEB-INF/images/FWM-icon.png").getFile());
    launch(args);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号