Search in sources :

Example 1 with Configurator

use of org.opt4j.core.config.visualization.Configurator in project opt4j by felixreimann.

the class Opt4J method main.

/**
 * Starts the {@link Opt4J} configuration GUI.
 *
 * @param args
 *            accepts a configuration file
 * @throws Exception
 */
public static void main(String[] args) throws Exception {
    System.out.println("Starting Opt4J " + getVersion() + " (Build " + getDateISO() + ")");
    if (args.length > 0 && args[0].equalsIgnoreCase("-s")) {
        SplashScreen splash = null;
        try {
            splash = SplashScreen.getSplashScreen();
        } catch (HeadlessException e) {
        // ignore
        }
        if (splash != null) {
            splash.close();
        }
        String[] a = new String[args.length - 1];
        System.arraycopy(args, 1, a, 0, a.length);
        Opt4JStarter.main(a);
    } else {
        SplashScreen splash = SplashScreen.getSplashScreen();
        SplashDecorator decorator = null;
        if (splash != null) {
            decorateVersionDate(splash);
            decorator = new SplashDecorator(splash);
        }
        searchModules(decorator);
        Configurator configurator = new Opt4J();
        configurator.start(args);
    }
}
Also used : HeadlessException(java.awt.HeadlessException) Configurator(org.opt4j.core.config.visualization.Configurator) SplashScreen(java.awt.SplashScreen)

Aggregations

HeadlessException (java.awt.HeadlessException)1 SplashScreen (java.awt.SplashScreen)1 Configurator (org.opt4j.core.config.visualization.Configurator)1