Launch the application given the archive file and a fully configured classloader.

@param args        the incoming arguments
@param mainClass   the main class to run
@param classLoader the classloader
@throws Exception if the launch fails
344771
protected void launch(String[] args, String mainClass, ClassLoader classLoader)
            throws Exception {
        Runnable runner = createMainMethodRunner(mainClass, args, classLoader);
        Thread.currentThread().setContextClassLoader(classLoader);
        runner.run();
    }
437400
public static void main(String[] args) throws Exception {
		Configuration globalConfig = GlobalConfiguration.loadConfiguration();
		PythonPlanBinder binder = new PythonPlanBinder(globalConfig);
		try {
			binder.runPlan(args);
		} catch (Exception e) {
			System.out.println("Failed to run plan: " + e.getMessage());
			LOG.error("Failed to run plan.", e);
		}
	}
652786
public static void main(final String[] args) {
        String url = "http://files.grouplens.org/datasets/movielens/ml-100k.zip";
        String folder = "data3/ml-100k";
        DataDownloader dd = new DataDownloader(url, folder);
        dd.downloadAndUnzip();
    }
987287
public static void main(String[] args) {
        if(args.length != 1) {
            System.out.println("usage: " + ApplicationLauncher.class.getName() + " namespace");
            System.exit(0);
            return;
        }

        // generate configuration sources
        String namespace= args[0];
        AbstractConfiguration[] configs;
        try {
            configs= ConfigurationGenerator.execute(
                namespace,
                ApplicationLauncher.class.getClassLoader(),
                LoggerFactory.getLogger(ApplicationLauncher.class));
        } catch (Exception e) {
        	e.printStackTrace();
            System.err.println("namespace does not contain a valid application definition: " + e.getMessage());
            System.exit(1);
            return;
        }
        
        // prepare compilation
        JavaCompiler compiler= ToolProvider.getSystemJavaCompiler();
        if(compiler == null) {
            System.err.println("Java compiler could not be found. Possibly you are running a JRE instead of a JDK!");
            System.exit(1);
            return;
        }
        
        final List<NodeConfiguration> nodes= new ArrayList<NodeConfiguration>();
        ArrayList<JavaFileObject> sources= new ArrayList<JavaFileObject>();
        for(AbstractConfiguration config : configs) {
            sources.add(new CharSequenceJavaFileObject(config.className, config.source));
            
            // collect nodes for later execution
            if(config instanceof NodeConfiguration) {
                nodes.add((NodeConfiguration) config);
            }
        }
        
        StandardJavaFileManager stdFileManager= compiler.getStandardFileManager(null, null, null);
        ByteFileManager<StandardJavaFileManager> byteFileManager= new ByteFileManager<StandardJavaFileManager>(stdFileManager);
        ConfigurationDiagnosticListener listener= new ConfigurationDiagnosticListener();
        CompilationTask task= compiler.getTask(null, byteFileManager, listener, null, null, sources);
        
        // compile
        boolean success= task.call().booleanValue();
        try {
            byteFileManager.close();
        } catch (IOException e1) {
            e1.printStackTrace();
            System.err.println("could not close file manager");
        }
        
        if(!success) {
            System.err.println("could not compile node configurations");
            System.err.println("  trying to dump generated source files...");
            
            File targetFolder= dumpSources(configs);
            
            if(targetFolder != null) {
                System.err.println(" dumped into " + targetFolder.toString());
            } else {
                System.err.println(" failed");
            }
            System.exit(1);
            return;
        }
        
        // launch the nodes
        Map<String, ByteArrayJavaFileObject> classes= byteFileManager.getStore();
        if(nodes.size() <= 0) {
            System.err.println("no nodes configured");
            System.exit(1);
        } else if(nodes.size() == 1) {
            // start the node in the current vm
            launchInCurrentVM(nodes.get(0).className, classes);
        } else {
            // write the configuration
            launchInNewVMs(nodes, classes);
        }
    }
765648
public static void main(String args[]) throws Exception {
        LaunchAppropriateUI launcher = new LaunchAppropriateUI(args);
        launcher.launch();
    }
402598
public static void main(String[] args) {
        try {
        	CSVDumper app = new CSVDumper();
        	app.parseArgs(args);
        	app.run();
            System.exit(0);
        }
        catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }        
    }
931855
public static void main(String[] args) throws Exception {
    int exitCode =  new Submitter().run(args);
    System.exit(exitCode);
  }
953808
public static void main(final String[] args) throws IOException {
        ShardingConfiguration shardingConfig = new ShardingConfigurationLoader().load();
        int port = getPort(args);
        if (null == shardingConfig.getServerConfiguration().getOrchestration()) {
            startWithoutRegistryCenter(shardingConfig.getRuleConfigurationMap(), shardingConfig.getServerConfiguration().getAuthentication(), shardingConfig.getServerConfiguration().getProps(), port);
        } else {
            startWithRegistryCenter(shardingConfig.getServerConfiguration(), shardingConfig.getRuleConfigurationMap().keySet(), shardingConfig.getRuleConfigurationMap(), port);
        }
    }
1120905
public static void main(final String[] args) {
        val properties = CasEmbeddedContainerUtils.getRuntimeProperties(Boolean.TRUE);
        val banner = CasEmbeddedContainerUtils.getCasBannerInstance();
        new SpringApplicationBuilder(CasWebApplication.class)
            .banner(banner)
            .web(WebApplicationType.SERVLET)
            .properties(properties)
            .logStartupInfo(true)
            .contextClass(CasWebApplicationContext.class)
            .run(args);
    }
6950
public static void main(String[] args) {
    final PrintWriter out = new PrintWriter(System.out);
    final PrintWriter err = new PrintWriter(System.err);
    final int code = Launcher.main2(out, err, Arrays.asList(args));
    System.exit(code);
  }
703402
public static void main(String[] args) {
		Test instance = JKFactory.instance(Test.class);
		System.out.println(instance.hello());
		System.out.println(instance.hello());
		System.out.println(instance.hello());
		System.out.println(instance.hello());

	}
244186
public static void main(String[] args) {
    ClassCache cache = new ClassCache();
    Iterator<String> packages = cache.packages();
    List<String> sorted = new ArrayList<>();
    while (packages.hasNext())
      sorted.add(packages.next());
    Collections.sort(sorted);
    for (String key: sorted)
      System.out.println(key + ": " + cache.getClassnames(key).size());
  }
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);
		}
	}
1049972
public static void main(String[] args) throws ClassNotFoundException {
        LogConfig.initMinimal();
        if (args.length < 4 || args.length > 7) {
            die("Expected 4 to 7 arguments", true);
        }
        File sourceDir = new File(args[0]);
        if (!sourceDir.isDirectory()) {
            die("Not a directory: " + sourceDir.getPath(), false);
        }
        File destDir = new File(args[1]);

        @SuppressWarnings("unchecked")
        Class<DODeserializer> deserializer = (Class<DODeserializer>) Class.forName(args[2]);
        @SuppressWarnings("unchecked")
        Class<DOSerializer> serializer = (Class<DOSerializer>) Class.forName(args[3]);

        // So DOTranslationUtility works...
        System.setProperty("fedora.hostname", "localhost");
        System.setProperty("fedora.port", "8080");
        System.setProperty("fedora.appServerContext", Constants.FEDORA_DEFAULT_APP_CONTEXT);

        boolean pretty = args.length > 4 && args[4].equals("true");

        String inExt = "xml";
        if (args.length > 5) inExt = args[5];

        String outExt = "xml";
        if (args.length > 6) outExt = args[6];

        ConvertObjectSerialization converter =
                new ConvertObjectSerialization(deserializer,
                                               serializer,
                                               pretty,
                                               inExt,
                                               outExt);
        converter.convert(sourceDir, destDir);

        TripleIteratorFactory.defaultInstance().shutdown();
    }
131921
public static void main(final String... args) throws Exception {
        try (ConfigurableApplicationContext context = SpringApplication.run(Application.class, args)) {
            log.info("Arguments: {}", Arrays.asList(args));

            try {
                context.getBean(Application.class).run(context);
            } catch (Exception e) {
                log.error("Exception in command execution", e);
            }
        }
    }
368085
public static void main(final String... args) throws Exception {

        final StorageConfiguration config = new StorageConfiguration(new File(args[0]));
        Storage.createStorage(config);
        final IStorage storage = Storage.openStorage(new File(args[0]));

        Injector injector =
            Guice.createInjector(new ModuleSetter().setDataFacClass(TreeNodeFactory.class).setMetaFacClass(
                NodeMetaPageFactory.class).createModule());
        IBackendFactory backend = injector.getInstance(IBackendFactory.class);
        IRevisioning revision = injector.getInstance(IRevisioning.class);
        Properties props = new Properties();
        props.setProperty(ConstructorProps.STORAGEPATH, storage.getLocation().getAbsolutePath());
        props.setProperty(ConstructorProps.RESOURCE, "shredded");
        storage.createResource(new ResourceConfiguration(props, backend, revision, new TreeNodeFactory(),
            new NodeMetaPageFactory()));
        final ISession session =
            storage.getSession(new SessionConfiguration("shredded", StandardSettings.KEY));

        final DefaultHandler defHandler = new DefaultHandler();

        final SAXSerializer serializer = new SAXSerializer(session, defHandler);
        serializer.call();

        session.close();
    }
521098
public static final void run(final Class<? extends Jawn> jawn, final String ... args) {
        Jawn instance = DynamicClassFactory.createInstance(jawn);
        
        if (instance.mode == Modes.DEV) {
            // load the instance with a non-caching classloader
            final Jawn dynamicInstance = DynamicClassFactory
                .createInstance(
                    DynamicClassFactory.getCompiledClass(jawn.getName(), false), 
                    Jawn.class
                );
            
            // look for changes to reload
            final Consumer<Jawn> reloader = (newJawnInstance) -> dynamicInstance.bootstrap.reboot___strap(newJawnInstance.routePopulator());
            PackageWatcher watcher = new PackageWatcher(jawn, reloader);
            
            // start the watcher
            try {
                watcher.start();
            } catch (IOException | InterruptedException e) {
                logger.error("Starting " + PackageWatcher.class, e);
            }
            
            // clean up when shutting the whole thing down
            dynamicInstance.onShutdown(() -> {
                try {
                    watcher.close();
                } catch (IOException e) {
                    logger.error("Closing " + PackageWatcher.class, e);
                }
            });
            
            instance = dynamicInstance;
        }
        
        run(instance, args);
    }