Main method.

@param args array of command line arguments
552988
public static void main(String[] args)
   {
      try
      {
         if (args.length != 2)
         {
            System.out.println("Usage: MpxjConvert <input file name> <output file name>");
         }
         else
         {
            MpxjConvert convert = new MpxjConvert();
            convert.process(args[0], args[1]);
         }

         System.exit(0);
      }

      catch (Exception ex)
      {
         System.out.println();
         System.out.print("Conversion Error: ");
         ex.printStackTrace(System.out);
         System.out.println();
         System.exit(1);
      }
   }
121875
public static void main(final String[] args) {
        Switch about = new Switch("a", "about", "display about message");
        Switch help = new Switch("h", "help", "display help message");
        FileArgument firstFastqFile = new FileArgument("1", "first-fastq-file", "first FASTQ input file", true);
        FileArgument secondFastqFile = new FileArgument("2", "second-fastq-file", "second FASTQ input file", true);
        FileArgument ssakeFile = new FileArgument("o", "ssake-file", "output SSAKE file, default stdout", false);
        FileArgument unpairedFile = new FileArgument("u", "unpaired-file", "write unpaired read names to file", false);
        IntegerArgument insertSize = new IntegerArgument("s", "insert-size", "insert size, must be at least zero, default " + DEFAULT_INSERT_SIZE, false);

        ArgumentList arguments = new ArgumentList(about, help, firstFastqFile, secondFastqFile, ssakeFile, insertSize, unpairedFile);
        CommandLine commandLine = new CommandLine(args);

        FastqToSsake fastqToSsake = null;
        try
        {
            CommandLineParser.parse(commandLine, arguments);
            if (about.wasFound()) {
                About.about(System.out);
                System.exit(0);
            }
            if (help.wasFound()) {
                Usage.usage(USAGE, null, commandLine, arguments, System.out);
                System.exit(0);
            }
            fastqToSsake = new FastqToSsake(firstFastqFile.getValue(), secondFastqFile.getValue(), ssakeFile.getValue(), insertSize.getValue(DEFAULT_INSERT_SIZE), unpairedFile.getValue());
        }
        catch (CommandLineParseException e) {
            if (about.wasFound()) {
                About.about(System.out);
                System.exit(0);
            }
            if (help.wasFound()) {
                Usage.usage(USAGE, null, commandLine, arguments, System.out);
                System.exit(0);
            }
            Usage.usage(USAGE, e, commandLine, arguments, System.err);
            System.exit(-1);
        }
        try {
            System.exit(fastqToSsake.call());
        }
        catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }
487208
public final static void main(String[] args) {
        if (args.length < 3) {
            usage("Not enough arguments.");
        }   // end if: args.length < 3
        else {
            String flag = args[0];
            String infile = args[1];
            String outfile = args[2];
            if (flag.equals("-e")) {
                Base64.encodeFileToFile(infile, outfile);
            }   // end if: encode
            else if (flag.equals("-d")) {
                Base64.decodeFileToFile(infile, outfile);
            }   // end else if: decode    
            else {
                usage("Unknown flag: " + flag);
            }   // end else    
        }   // end else
    }
648863
public static void main(String[] args) {
    try {
      ToolRunner.run(new ProcessingRecordsPrinter(), args);
    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }
303036
public static void main(String[] args) {
    System.exit(getConf(
        ClientContext.create(new InstancedConfiguration(ConfigurationUtils.defaults())), args));
  }
421200
public static void main(String[] args) {
        Settings settings = new Settings();
        new JCommander(settings, args);

        if (!settings.isGuiSupressed()) {
            OkapiUI okapiUi = new OkapiUI();
            okapiUi.setVisible(true);
        } else {
            int returnValue;
            
            returnValue = commandLine(settings);
            
            if (returnValue != 0) {
                System.out.println("An error occurred");
            }
        }
    }
762806
public static void main(String[] arg) {

        System.getProperties().put("sun.java2d.noddraw", "true");

        // (ulrivo): read all arguments from the command line
        String  lowerArg;
        String  urlid        = null;
        String  rcFile       = null;
        boolean autoConnect  = false;
        boolean urlidConnect = false;

        bMustExit = true;

        for (int i = 0; i < arg.length; i++) {
            lowerArg = arg[i].toLowerCase();

            if (lowerArg.startsWith("--")) {
                lowerArg = lowerArg.substring(1);
            }

            i++;

            if (lowerArg.equals("-driver")) {
                defDriver   = arg[i];
                autoConnect = true;
            } else if (lowerArg.equals("-url")) {
                defURL      = arg[i];
                autoConnect = true;
            } else if (lowerArg.equals("-user")) {
                defUser     = arg[i];
                autoConnect = true;
            } else if (lowerArg.equals("-password")) {
                defPassword = arg[i];
                autoConnect = true;
            } else if (lowerArg.equals("-urlid")) {
                urlid        = arg[i];
                urlidConnect = true;
            } else if (lowerArg.equals("-rcfile")) {
                rcFile       = arg[i];
                urlidConnect = true;
            } else if (lowerArg.equals("-dir")) {
                defDirectory = arg[i];
            } else if (lowerArg.equals("-script")) {
                defScript = arg[i];
            } else if (lowerArg.equals("-noexit")) {
                bMustExit = false;

                i--;
            } else if (lowerArg.equals("-help")) {
                showUsage();
                return;
            } else {
                /* Syntax ERRORS should either throw or exit with non-0 status.
                 * In our case, it may be unsafe to exit, so we throw.
                 * (I.e. should provide easy way for caller to programmatically
                 * determine that there was an invocation problem).
                 */

                throw new IllegalArgumentException(
                        "Try:  java... " + DatabaseManagerSwing.class.getName()
                        + " --help");
                // No reason to localize, since the main syntax message is
                // not localized.
            }
        }

        DatabaseManagerSwing m =
            new DatabaseManagerSwing(new JFrame("HSQL Database Manager"));

        // Added: (weconsultants@users): Need databaseManagerSwing for later Reference
        refForFontDialogSwing = m;

        m.main();

        Connection c = null;

        m.setWaiting("Initializing");

        try {
            if (autoConnect && urlidConnect) {
                throw new IllegalArgumentException(
                    "You may not specify both (urlid) AND (url/user/password).");
            }

            if (autoConnect) {
                c = ConnectionDialogSwing.createConnection(defDriver, defURL,
                        defUser, defPassword);
            } else if (urlidConnect) {
                if (urlid == null) {
                    throw new IllegalArgumentException(
                        "You must specify an 'urlid' to use an RC file");
                }

                autoConnect = true;

                String rcfilepath = (rcFile == null) ? DEFAULT_RCFILE
                                                     : rcFile;
                RCData rcdata     = new RCData(new File(rcfilepath), urlid);

                c = rcdata.getConnection(
                    null, System.getProperty("sqlfile.charset"),
                    System.getProperty("javax.net.ssl.trustStore"));
            } else {
                c = ConnectionDialogSwing.createConnection(m.jframe,
                        "Connect");
            }
        } catch (Exception e) {

            //  Added: (weconsultants@users)
            CommonSwing.errorMessage(e);
        } finally {
            m.setWaiting(null);
        }

        if (c != null) {
            m.connect(c);
        }

        // Added: (weconsultants@users): For preloadng FontDialogSwing
        FontDialogSwing.creatFontDialog(refForFontDialogSwing);
        m.start();
    }
290382
public static void main(String[] args) throws IOException
    {
        process_command_line(args);

        info = new JarInfo();

        if (printVersion) {
            doPrintVersion();
        }
        if (printHelp) {
            doPrintHelp();
        }
    }
42799
public static void main(final String[] args)
      throws IOException, JDOMException {
    CLI cmdLine = new CLI();
    cmdLine.parseCLI(args);
  }
9845
public static void main(String[] args) throws Throwable {
		CliArguments arguments = CliArguments.parse(args);
		if (arguments.isSet() && !arguments.isUsageMode()) {
			CliRunner runner = new CliRunner(arguments);
			try {
				runner.run();
			} finally {
				runner.close();
			}
		} else {
			PrintWriter out = new PrintWriter(System.out);
			printUsage(out);
			FileHelper.safeClose(out);
		}
	}
979198
public static void main(final String[] args) {
    GUIUtil.logUncaughtExceptions(LOG);
    GUIUtil.setLookAndFeel();
    OutputStep.setDefaultHandlerVisualizer();

    javax.swing.SwingUtilities.invokeLater(new Runnable() {
      @Override
      public void run() {
        try {
          final MultiStepGUI gui = new MultiStepGUI();
          gui.run();
          if(args != null && args.length > 0) {
            gui.setParameters(new SerializedParameterization(args));
          }
          else {
            gui.setParameters(new SerializedParameterization());
          }
        }
        catch(Exception | Error e) {
          // Restore error handler, as the GUI is likely broken.
          LoggingConfiguration.replaceDefaultHandler(new CLISmartHandler());
          LOG.exception(e);
        }
      }
    });
  }
265528
public static void main(String[] args) {
        for (Version v: identify().values()) {
            System.err.println(v);
        }
    }
522297
public static void main(String[] args)
   {
      final int argsLength = args.length;
      if (argsLength < 1)
      {
         usage();
         System.exit(OTHER);
      }
      String rarFile = "";
      String[] cps = null;
      boolean stdout = false;
      String reportFile = "";

      for (int i = 0; i < argsLength; i++)
      {
         String arg = args[i];
         if (arg.equals(ARGS_CP))
         {
            cps = args[++i].split(System.getProperty("path.separator"));
         }
         else if (arg.equals(ARGS_STDOUT))
         {
            stdout = true;
         }
         else if (arg.equals(ARGS_OUT))
         {
            reportFile = args[++i];
         }
         else if (arg.endsWith("rar"))
         {
            rarFile = arg;
         }
         else
         {
            usage();
            System.exit(OTHER);
         }
      }
      int exitCode = rarInfo(rarFile, cps, stdout, reportFile);
      if (exitCode == SUCCESS)
      {
         System.out.println("Done.");
      }
      System.exit(exitCode);
   }
612278
public static void main(final String[] args) {
        Switch about = new Switch("a", "about", "display about message");
        Switch help = new Switch("h", "help", "display help message");
        FileArgument refBedFile = new FileArgument("r", "ref-bed-file", "reference BED file", true);
        FileArgument sourceBedFile = new FileArgument("i", "source-bed-file", "input BED file, default stdin", false);
        FileArgument targetBedFile = new FileArgument("o", "target-bed-file", "output BED file, default stdout", false);

        ArgumentList arguments = new ArgumentList(about, help, refBedFile, sourceBedFile, targetBedFile);
        CommandLine commandLine = new CommandLine(args);

        LiftoverBed liftoverBed = null;
        try {
            CommandLineParser.parse(commandLine, arguments);
            if (about.wasFound()) {
                About.about(System.out);
                System.exit(0);
            }
            if (help.wasFound()) {
                Usage.usage(USAGE, null, commandLine, arguments, System.out);
                System.exit(0);
            }
            liftoverBed = new LiftoverBed(refBedFile.getValue(), sourceBedFile.getValue(), targetBedFile.getValue());
        }
        catch (CommandLineParseException e) {
            if (about.wasFound()) {
                About.about(System.out);
                System.exit(0);
            }
            if (help.wasFound()) {
                Usage.usage(USAGE, null, commandLine, arguments, System.out);
                System.exit(0);
            }
            Usage.usage(USAGE, e, commandLine, arguments, System.err);
            System.exit(-1);
        }
        try {
            System.exit(liftoverBed.call());
        }
        catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }
84139
public static void main(final String[] args) {
		BenchmarkOutputParser parser = new BenchmarkOutputParser(FRAMEWORKS.keySet());
		HtmlDiagramRenderer renderer = new HtmlDiagramRenderer(FRAMEWORKS);
		renderer.output(parser.parse(OUTPUT_FILE));
	}
116910
public static void main(String[] args) {
    EventQueue.invokeLater(new Runnable() {
      @Override
      public void run() {
        try {
          ScannerReportViewerApp window = new ScannerReportViewerApp();
          window.frame.setVisible(true);

          window.loadReport();
        } catch (Exception e) {
          e.printStackTrace();
        }
      }

    });
  }
186334
public static void main(String[] args) throws IOException {
    if (args.length == 0 || args[0].equals("--help")) {
      help();
      return;
    }
    if (args[0].equals("--list")) {
      listFilesystems();
      return;
    }
    if (args[0].equals("--check")) {
      checkGcs();
      return;
    }
    for (String a : args) {
      statFile(a);
    }
  }