public static void main(final String[] args) {
		java.awt.EventQueue.invokeLater(new Runnable() {
			@Override
			public void run() {

				try {
					for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager
							.getInstalledLookAndFeels()) {
						if ("Nimbus".equals(info.getName())) {
							javax.swing.UIManager.setLookAndFeel(info
									.getClassName());
							break;
						}
					}
				} catch (ClassNotFoundException ex) {
					System.err.println("class not found." + ex.getMessage());
				} catch (InstantiationException ex) {
					System.err.println("Instantiation exception."
							+ ex.getMessage());
				} catch (IllegalAccessException ex) {
					System.err.println("Illegal Access." + ex.getMessage());
				} catch (javax.swing.UnsupportedLookAndFeelException ex) {
					System.err.println("unsupported look and feel."
							+ ex.getMessage());
				}

				MainFrame main = new MainFrame(args);
				LogPaneAppender loghelper = new LogPaneAppender();
				org.apache.log4j.varia.LevelRangeFilter filter = new org.apache.log4j.varia.LevelRangeFilter();
				String debug = System.getProperty("jnlp.debug");
				if (debug != null) {
					filter.setLevelMin(Level.DEBUG);
				} else {
					filter.setLevelMin(Level.INFO);
				}
				loghelper.addFilter(filter);
				loghelper.setLogPane(main.getLogPanel());

				Logger loggers = Logger.getRootLogger();
				loggers.addAppender(loghelper);
				// if (debug != null) {
				org.apache.log4j.ConsoleAppender consoleAppender = new org.apache.log4j.ConsoleAppender(
						new org.apache.log4j.PatternLayout(
								PatternLayout.TTCC_CONVERSION_PATTERN));
				consoleAppender.setName("console log");
				consoleAppender.addFilter(filter);
				loggers.addAppender(consoleAppender);
				// }

				try {
					InetAddress adress = InetAddress.getLocalHost();
					Command.localhostIp = adress.getHostAddress();
					main.setLocalIp(Command.localhostIp);
					Command.broadcastIp = Command.localhostIp.substring(0,
							Command.localhostIp.lastIndexOf(".")) + ".255";
				} catch (Exception e) {
					logger.error(e);
				}
				// main.setUndecorated(true);
				main.setVisible(true);
				main.addWindowListener(new WindowAdapter() {
					public void windowClosing(WindowEvent e) {
					}
				});

				logger.info("framework initialization done.");
			}
		});
	}