Main method that starts the CLR Bridge from Java.

@param args command line parameters.
493826
public static void main(final String[] args) {
    LOG.log(Level.INFO, "Entering Launch at :::" + new Date());
    try {
      if (args == null || args.length == 0) {
        throw new IllegalArgumentException("No arguments provided, at least a clrFolder should be supplied.");
      }
      final File dotNetFolder = new File(args[0]).getAbsoluteFile();
      final String[] removedArgs = Arrays.copyOfRange(args, 1, args.length);

      final Configuration config = getClientConfiguration(removedArgs);
      final Injector commandLineInjector = Tang.Factory.getTang().newInjector(parseCommandLine(removedArgs));
      final int waitTime = commandLineInjector.getNamedInstance(WaitTimeForDriver.class);
      final int driverMemory = commandLineInjector.getNamedInstance(DriverMemoryInMb.class);
      final boolean isLocal = commandLineInjector.getNamedInstance(Local.class);
      final String driverIdentifier = commandLineInjector.getNamedInstance(DriverIdentifier.class);
      final String jobSubmissionDirectory = commandLineInjector.getNamedInstance(DriverJobSubmissionDirectory.class);
      final boolean submit = commandLineInjector.getNamedInstance(Submit.class);
      final Injector injector = Tang.Factory.getTang().newInjector(config);
      final JobClient client = injector.getInstance(JobClient.class);
      client.setDriverInfo(driverIdentifier, driverMemory, jobSubmissionDirectory);

      if (submit) {
        client.submit(dotNetFolder, true, isLocal, null);
        client.waitForCompletion(waitTime);
      } else {
        client.submit(dotNetFolder, false, isLocal, config);
        client.waitForCompletion(0);
      }


      LOG.info("Done!");
    } catch (final BindException | InjectionException | IOException ex) {
      LOG.log(Level.SEVERE, "Job configuration error", ex);
    }
  }
342677
@SuppressWarnings("unchecked")
	public static void main(String[] args)
	{
		List<File> filenames = new Vector<File>();
		List<File> pathnames = new Vector<File>();
		List<String> largs = Arrays.asList(args);
		VDMJ controller = null;
		Dialect dialect = Dialect.VDM_SL;
		String remoteName = null;
		Class<RemoteControl> remoteClass = null;
		String defaultName = null;

		Properties.init(); // Read properties file, if any
		Settings.usingCmdLine = true;
		
		if(largs.contains("-version"))
		{
			println(getOvertureVersion());
			System.exit(0);
		}
		
		for (Iterator<String> i = largs.iterator(); i.hasNext();)
		{
			String arg = i.next();

			if (arg.equals("-vdmsl"))
			{
				controller = new VDMSL();
				dialect = Dialect.VDM_SL;
			} else if (arg.equals("-vdmpp"))
			{
				controller = new VDMPP();
				dialect = Dialect.VDM_PP;
			} else if (arg.equals("-vdmrt"))
			{
				controller = new VDMRT();
				dialect = Dialect.VDM_RT;
			} else if (arg.equals("-w"))
			{
				warnings = false;
			} else if (arg.equals("-i"))
			{
				interpret = true;
			} else if (arg.equals("-p"))
			{
				pog = true;
			} else if (arg.equals("-q"))
			{
				quiet = true;
			} else if (arg.equals("-e"))
			{
				Settings.usingCmdLine = false;
				interpret = true;
				pog = false;

				if (i.hasNext())
				{
					script = i.next();
				} else
				{
					usage("-e option requires an expression");
				}
			} else if (arg.equals("-o"))
			{
				if (i.hasNext())
				{
					if (outfile != null)
					{
						usage("Only one -o option allowed");
					}

					outfile = i.next();
				} else
				{
					usage("-o option requires a filename");
				}
			} else if (arg.equals("-c"))
			{
				if (i.hasNext())
				{
					filecharset = validateCharset(i.next());
				} else
				{
					usage("-c option requires a charset name");
				}
			} else if (arg.equals("-t"))
			{
				if (i.hasNext())
				{
					Console.setCharset(validateCharset(i.next()));
				} else
				{
					usage("-t option requires a charset name");
				}
			} else if (arg.equals("-r"))
			{
				if (i.hasNext())
				{
					Settings.release = Release.lookup(i.next());

					if (Settings.release == null)
					{
						usage("-r option must be " + Release.list());
					}
				} else
				{
					usage("-r option requires a VDM release");
				}
			} else if (arg.equals("-pre"))
			{
				Settings.prechecks = false;
			} else if (arg.equals("-post"))
			{
				Settings.postchecks = false;
			} else if (arg.equals("-inv"))
			{
				Settings.invchecks = false;
			} else if (arg.equals("-dtc"))
			{
				// NB. Turn off both when no DTC
				Settings.invchecks = false;
				Settings.dynamictypechecks = false;
			} else if (arg.equals("-measures"))
			{
				Settings.measureChecks = false;
			} else if (arg.equals("-log"))
			{
				if (i.hasNext())
				{
					logfile = i.next();
				} else
				{
					usage("-log option requires a filename");
				}
			} else if (arg.equals("-remote"))
			{
				if (i.hasNext())
				{
					interpret = true;
					remoteName = i.next();
				} else
				{
					usage("-remote option requires a Java classname");
				}
			} else if (arg.equals("-default"))
			{
				if (i.hasNext())
				{
					defaultName = i.next();
				} else
				{
					usage("-default option requires a name");
				}
			} else if (arg.equals("-path"))
			{
				if (i.hasNext())
				{
					File path = new File(i.next());

					if (path.isDirectory())
					{
						pathnames.add(path);
					} else
					{
						usage(path + " is not a directory");
					}
				} else
				{
					usage("-path option requires a directory");
				}
			}else if (arg.equals("-baseDir"))
			{
				if (i.hasNext())
				{
					try
					{
						Settings.baseDir = new File(i.next());
					} catch (IllegalArgumentException e)
					{
						usage(e.getMessage() + ": " + arg);
					}
				} else
				{
					usage("-baseDir option requires a folder name");
				}
			}  else if (arg.startsWith("-"))
			{
				usage("Unknown option " + arg);
			} else
			{
				// It's a file or a directory
				File file = new File(arg);

				if (file.isDirectory())
				{
					for (File subFile : file.listFiles(dialect.getFilter()))
					{
						if (subFile.isFile())
						{
							filenames.add(subFile);
						}
					}
				} else
				{
					if (file.exists())
					{
						filenames.add(file);
					} else
					{
						boolean OK = false;

						for (File path : pathnames)
						{
							File pfile = new File(path, arg);

							if (pfile.exists())
							{
								filenames.add(pfile);
								OK = true;
								break;
							}
						}

						if (!OK)
						{
							usage("Cannot find file " + file);
						}

					}
				}
			}
		}

		if (controller == null)
		{
			usage("You must specify either -vdmsl, -vdmpp or -vdmrt");
		}

		if (logfile != null && !(controller instanceof VDMRT))
		{
			usage("The -log option can only be used with -vdmrt");
		}

		if (remoteName != null)
		{
			try
			{
				Class<?> cls = ClassLoader.getSystemClassLoader().loadClass(remoteName);
				remoteClass = (Class<RemoteControl>) cls;
			} catch (ClassNotFoundException e)
			{
				usage("Cannot locate " + remoteName + " on the CLASSPATH");
			}
		}

		ExitStatus status = null;

		if (filenames.isEmpty() && (!interpret || remoteClass != null))
		{
			usage("You didn't specify any files");
			status = ExitStatus.EXIT_ERRORS;
		} else
		{
			do
			{
				if (filenames.isEmpty())
				{
					status = controller.interpret(filenames, null);
				} else
				{
					status = controller.parse(filenames);

					if (status == ExitStatus.EXIT_OK)
					{
						status = controller.typeCheck();

						if (status == ExitStatus.EXIT_OK && interpret)
						{
							if (remoteClass == null)
							{
								status = controller.interpret(filenames, defaultName);
							} else
							{
								try
								{
									final RemoteControl remote = remoteClass.newInstance();
									Interpreter i = controller.getInterpreter();

									if (defaultName != null)
									{
										i.setDefaultName(defaultName);
									}

									i.init(null);

									try
									{
										// remote.run(new RemoteInterpreter(i, null));
										final RemoteInterpreter remoteInterpreter = new RemoteInterpreter(i, null);
										Thread remoteThread = new Thread(new Runnable()
										{

											public void run()
											{
												try
												{
													remote.run(remoteInterpreter);
												} catch (Exception e)
												{
													println(e.getMessage());
													// status = ExitStatus.EXIT_ERRORS;
												}
											}
										});
										remoteThread.setName("RemoteControl runner");
										remoteThread.setDaemon(true);
										remoteThread.start();
										remoteInterpreter.processRemoteCalls();
										status = ExitStatus.EXIT_OK;
									} catch (Exception e)
									{
										println(e.getMessage());
										status = ExitStatus.EXIT_ERRORS;
									}
								} catch (InstantiationException e)
								{
									usage("Cannot instantiate " + remoteName);
								} catch (Exception e)
								{
									usage(e.getMessage());
								}
							}
						}
					}
				}
			} while (status == ExitStatus.RELOAD);
		}

		if (interpret)
		{
			infoln("Bye");
		}

		System.exit(status == ExitStatus.EXIT_OK ? 0 : 1);
	}
767226
public static void main(String[] args) {

        DDLGenerationUtility util = new DDLGenerationUtility();

        // No task handlers since this is a single function script.
        // At least it is right now.
        int rc = util.runProgram(args);

        System.exit(rc);
    }
265528
public static void main(String[] args) {
        for (Version v: identify().values()) {
            System.err.println(v);
        }
    }
316853
public static void main(String... args) {
        CommandLineRunner runner = new CommandLineRunner();

        try {
            runner.run(args);
        } catch (Exception t) {
            System.err.println(t.getMessage());
            System.err.println("Try '--help' for more information.");

            t.printStackTrace(System.err);

            System.exit(1);
        }

        System.exit(0);
    }
806321
public static void main(String[] args) {
        ServerSchemaGenCommand util = new ServerSchemaGenCommand();
        int rc = util.generateServerSchema(args);
        System.exit(rc);
    }
336807
public static void main(String[] args) {
    try {
      System.exit( ToolRunner.run(null, new Balancer(), args) );
    } catch (Throwable e) {
      LOG.error(StringUtils.stringifyException(e));
      System.exit(-1);
    }

  }
1160931
public static void main(final String[] args) {
        new SpringApplicationBuilder(CasEurekaServerWebApplication.class)
            .banner(new CasEurekaServerBanner())
            .logStartupInfo(true)
            .bannerMode(Banner.Mode.CONSOLE)
            .web(WebApplicationType.SERVLET)
            .run(args);
    }
50457
public static void main(String[] arg) {

        bMustExit = true;

        // (ulrivo): read all arguments from the command line
        int i = 0;

        while (i < arg.length) {
            if (arg[i].equalsIgnoreCase("-driver") && (i + 1 < arg.length)) {
                i++;

                defDriver = arg[i];
            } else if (arg[i].equalsIgnoreCase("-url")
                       && (i + 1 < arg.length)) {
                i++;

                defURL = arg[i];
            } else if (arg[i].equalsIgnoreCase("-width")
                       && (i + 1 < arg.length)) {
                i++;

                try {
                    defWidth = Integer.parseInt(arg[i]);
                } catch (Exception e) {}
            } else if (arg[i].equalsIgnoreCase("-height")
                       && (i + 1 < arg.length)) {
                i++;

                try {
                    defHeight = Integer.parseInt(arg[i]);
                } catch (Exception e) {}
            } else if (arg[i].equalsIgnoreCase("-locx")
                       && (i + 1 < arg.length)) {
                i++;

                try {
                    defLocX = Integer.parseInt(arg[i]);
                } catch (Exception e) {}
            } else if (arg[i].equalsIgnoreCase("-locy")
                       && (i + 1 < arg.length)) {
                i++;

                try {
                    defLocY = Integer.parseInt(arg[i]);
                } catch (Exception e) {}
            } else if (arg[i].equalsIgnoreCase("-user")
                       && (i + 1 < arg.length)) {
                i++;

                defUser = arg[i];
            } else if (arg[i].equalsIgnoreCase("-password")
                       && (i + 1 < arg.length)) {
                i++;

                defPassword = arg[i];
            } else if (arg[i].equalsIgnoreCase("-query")
                       && (i + 1 < arg.length)) {
                i++;

                defQuery = arg[i];
            } else if (arg[i].equalsIgnoreCase("-defDirectory")
                       && (i + 1 < arg.length)) {
                i++;

                defDirectory = arg[i];
            } else if (arg[i].equalsIgnoreCase("-database")
                       && (i + 1 < arg.length)) {
                i++;

                defDatabase = arg[i];
            } else {
                showUsage();

                return;
            }

            i++;
        }

        ZaurusDatabaseManager m = new ZaurusDatabaseManager();

        m.main();

        // (ulrivo): make default connection if arguments set via the command line
        Connection c = null;

        if ((defDriver != null && defURL != null) || (defDatabase != null)) {
            if (defDatabase != null) {
                defDriver   = "org.hsqldb_voltpatches.jdbcDriver";
                defURL      = "jdbc:hsqldb:" + defDatabase;
                defUser     = "SA";
                defPassword = "";
            }

            try {
                Class.forName(defDriver).newInstance();

                c = DriverManager.getConnection(defURL, defUser, defPassword);
            } catch (Exception e) {
                System.out.println("No connection for " + defDriver + " at "
                                   + defURL);
                e.printStackTrace();
            }
        } else {
            c = ZaurusConnectionDialog.createConnection(m.fMain, "Connect",
                    new Insets(defWidth, defHeight, defLocX, defLocY));
        }

        if (c == null) {
            return;
        }

        m.connect(c);
    }
1181277
public static void main(final String[] args) {
        new SpringApplicationBuilder(CasSpringBootAdminServerWebApplication.class)
            .banner(new CasSpringBootAdminServerBanner())
            .bannerMode(Banner.Mode.CONSOLE)
            .logStartupInfo(true)
            .web(WebApplicationType.SERVLET)
            .run(args);
    }
1242137
public static void main(String[] args) throws IOException {
    Properties props = new Properties(System.getProperties());
    props.load(JobServerMain.class.getResourceAsStream("system.properties"));
    System.setProperties(props);
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
      public void run() {
        startServer();
      }
    });
  }
132263
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 inputHmlFile = new FileArgument("i", "input-hml-file", "input HML file, default stdin", false);
        FileArgument outputFile = new FileArgument("o", "output-file", "output allele assignment file, default stdout", false);

        ArgumentList arguments = new ArgumentList(about, help, inputHmlFile, outputFile);
        CommandLine commandLine = new CommandLine(args);

        ExtractExpectedHaploids extractExpectedHaploids = 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);
            }
            extractExpectedHaploids = new ExtractExpectedHaploids(inputHmlFile.getValue(), outputFile.getValue());
        }
        catch (CommandLineParseException | IllegalArgumentException e) {
            Usage.usage(USAGE, e, commandLine, arguments, System.err);
            System.exit(-1);
        }
        try {
            System.exit(extractExpectedHaploids.call());
        }
        catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }
145844
public static void main(String[] args)
	{
	   
		try
		{
			RMI.startRmiRegistry(Integer.parseInt(args[0]));
			System.in.read();
		}
		catch (Exception e)
		{
		
			e.printStackTrace();
		}
	}
247521
public static void main(String[] args) {
        System.exit(call(System.out, System.err, args) ? 0 : 1);
    }
183099
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 pairedFile = new FileArgument("p", "paired-file", "output interleaved paired FASTQ file", true);
        FileArgument unpairedFile = new FileArgument("u", "unpaired-file", "output unpaired FASTQ file", true);

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

        InterleaveFastq interleaveFastq = 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);
            }
            interleaveFastq = new InterleaveFastq(firstFastqFile.getValue(), secondFastqFile.getValue(), pairedFile.getValue(), 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(interleaveFastq.call());
        }
        catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }
102892
public static void main(String[] args) {
		PrintStream out = System.out;
		if (args.length > 0) {
			try {
				out = new PrintStream(new File(args[0]));
			} catch (FileNotFoundException e) {
				System.out.printf(ERR_FILE, args[0]);
			}
		}
		MBeanScanner mBeanScanner = new MBeanScanner();
		List<Config> configs = mBeanScanner.scan();
		ConfigWriter cw;
		cw = new ConfigWriter(out, configs);
		cw.write();
	}
203450
public static void main(String[] args) throws IOException {
        CommandLineInterface cli = new CommandLineInterface();
        cli.addOpt("-d", "directory", "./");
        cli.addOpt("-a", "alpha", "" + DEFAULT_ALPHA);
        cli.addOpt("-s", "seed", null);
        cli.parse(args);

        if (cli.hasParam("--genprofile")) {
            cli.generateProfile();
        } else if (cli.hasParam("--detectlang")) {
            cli.detectLang();
        } else if (cli.hasParam("--batchtest")) {
            cli.batchTest();
        }
    }