Package utils

Examples of utils.Options


            "config:",
            "help",
            "log",
            "version"
        };
        Options opt = Options.parse(args, options);
        if (opt.isSet("help")) {
            String helpText =
                "Usage: java -classpath "+
                    FileUtil.getHomeDir() +
                    "/classes com.barrybecker4.game.twoplayer.go.server.GtpTesujisoftGoServer [options]\n" +
                    '\n' +
                "-config       config file\n" +
                "-help         display this help and exit\n" +
                "-log file     log GTP stream to file\n" +
                "-version      print version and exit\n";
            System.out.print(helpText);
            return null;
        }
        if (opt.isSet("version")) {
            System.out.println("GtpTesujisoft " + GoController.VERSION);
            return null;
        }
        PrintStream log;
        if (opt.isSet("log")) {
            File file = new File(opt.getString("log"));
            log = new PrintStream(new FileOutputStream(file));
        }
        else {
            String logFile = FileUtil.getHomeDir() + "/temp/" + "log.txt";
            File file = new File(logFile);
View Full Code Here

TOP

Related Classes of utils.Options

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.