// has java6?
if (!SystemUtils.IS_JAVA_1_6) {
mess.add(T.r("start.java", SystemUtils.JAVA_VERSION), Level.ERROR_INT);
}
final YWindowStart y = new YWindowStart();
// add log
final AppenderSkeleton aps = addLog(y);
// load rest
I18N.init();
T.addOptions();
YaFrame.init();
YaFrame.registerTab(new BasicTabEvent());
YaFrame.registerTab(new ProjectTabEvent());
ProjectManagement.start();
FavoritManagement.init();
// error test
// YEx.error("title", new Throwable("test2"));
// add plugins
PluginPlugin.start(mess);
// Get the current screen size & check it
Dimension scrnsize = Toolkit.getDefaultToolkit().getScreenSize();
if (scrnsize.getWidth() < 1024 || scrnsize.getHeight() < 768) {
mess.add(T.r("start.window", YAamsCore.NAME, scrnsize.getWidth(), scrnsize.getHeight()), Level.INFO_INT);
}
Log.ger.info("Calc for Screen: " + scrnsize.getWidth() + "x" + scrnsize.getHeight());
// check ram
if (Runtime.getRuntime().maxMemory() < 1024 * 1024 * 242) {
mess.add(T.r("start.memory", YAamsCore.NAME, Runtime.getRuntime().maxMemory() / (1024 * 1024)), Level.INFO_INT);
}
// check Beta
if (YAamsCore.BETA) {
mess.add(T.r("start.beta"), Level.WARN_INT);
}
if (mess.getLevel() == Level.INFO_INT) {
// exist system?
if (mess.setTitle(T.r("start.welcome", YAamsCore.NAME)).showOk()) {
YaFrame.get().start();
}
} else {
// exist system?
if (mess.setFooter(T.r("dialog.ignore")).showQuestion()) {
YaFrame.get().start();
}
}
// remove log & savemode
Log.ger.removeAppender(aps);
Setting.getSystemPreferences().putInt("startmode", 0);
Setting.saveSystemPreferences();
y.close();
}