Main method.

@param args - arguments.
@throws Exception - exception.
775444
public static void main(String[] args) throws Exception {
    System.out.println("Start gateway");
    Microservices gateway =
        Microservices.builder()
            .discovery(ScalecubeServiceDiscovery::new)
            .transport(ServiceTransports::rsocketServiceTransport)
            .gateway(opts -> new HttpGatewayExample(opts.id("http").port(8181)))
            .gateway(opts -> new WebsocketGatewayExample(opts.id("ws").port(9191)))
            .startAwait();

    System.out.println("Start HelloWorldService with BusinessLogicFacade");
    final Microservices node1 =
        Microservices.builder()
            .discovery(serviceEndpoint -> serviceDiscovery(serviceEndpoint, gateway))
            .transport(ServiceTransports::rsocketServiceTransport)
            .services(
                call ->
                    Collections.singleton(
                        ServiceInfo.fromServiceInstance(
                                new HelloWorldServiceImpl(
                                    new BusinessLogicFacade(
                                        call.api(ServiceHello.class),
                                        call.api(ServiceWorld.class))))
                            .build()))
            .startAwait();

    System.out.println("Start ServiceHello");
    final Microservices node2 =
        Microservices.builder()
            .discovery(serviceEndpoint -> serviceDiscovery(serviceEndpoint, gateway))
            .transport(ServiceTransports::rsocketServiceTransport)
            .services(new ServiceHelloImpl())
            .startAwait();

    System.out.println("Start ServiceWorld");
    final Microservices node3 =
        Microservices.builder()
            .discovery(serviceEndpoint -> serviceDiscovery(serviceEndpoint, gateway))
            .transport(ServiceTransports::rsocketServiceTransport)
            .services(new ServiceWorldImpl())
            .startAwait();

    System.out.println("Wait for some time so nodes could catch up with each other ...");
    TimeUnit.SECONDS.sleep(3);

    System.out.println("Making hello world business logic ...");
    HelloWorldService helloWorldService = node1.call().api(HelloWorldService.class);

    String helloWorld = helloWorldService.helloWorld().block(Duration.ofSeconds(6));
    System.out.println("Result of calling hello world business logic is ... => " + helloWorld);

    Mono.when(gateway.shutdown(), node1.shutdown(), node2.shutdown(), node3.shutdown())
        .block(Duration.ofSeconds(5));
  }
85411
public static void main(String [] args) {
		String result = run(args);
		if (result.length() != 0) {
			System.err.println(result);
			System.exit(1);
		}
	}
576916
public static void main(String[] args) {
		final int retCode = createMainObject().runCompiler(args);
		System.exit(retCode);
	}
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);
            }
        }
    }
132396
public static void main(String... argv) throws IOException {
    run(System.out, argv);
    System.out.println();
  }
765648
public static void main(String args[]) throws Exception {
        LaunchAppropriateUI launcher = new LaunchAppropriateUI(args);
        launcher.launch();
    }
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);
		}
	}
400068
public static void main(String[] args) throws Exception {

        CmsRemoteShellClient client = new CmsRemoteShellClient(args);
        client.run();
    }
1354306
public static void main(String[] args) throws Exception {
    int exitCode = ToolRunner.run(new gen_flatfile(), args);
    System.exit(exitCode);
  }
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);
        }
      }
    });
  }
770925
public static void main(String[] args) {
		try {
			int result = new EasyJaSubCommandLineApp(new EasyJaSubCommandLine())
					.run(args, new PrintWriter(System.out), new PrintWriter(
							System.err));
			System.exit(result);
		} catch (Exception e) {
			System.err.println("Unhandled application error:");
			e.printStackTrace(System.err);
			System.exit(-1000);
		}
	}
477639
public static void main(String[] args) throws Exception {
        JSONClient app = new JSONClient();

        // Initialize connections
        app.initialize();

        // load data, measuring the throughput.
        app.loadDatabase();

        // run sample JSON queries
        app.runQueries();

        // Disconnect
        app.shutdown();
    }
581651
@SuppressWarnings("InfiniteLoopStatement")
	public static void main(String[] args) throws Exception {
		LoggingCallback loggingCallback = new LoggingCallback();
		loggingCallback.setLevel(Level.INFO);
		SimonManager.callback().addCallback(loggingCallback);
		Random random = new Random();

		register();
		try {
			while (true) {
				final int task = random.nextInt(TASK_SPREAD) + TASK_MIN;
				new Thread() {
					public void run() {
						try (Split split = SimonManager.getStopwatch(TASK_STOPWATCH).start()) {
							Thread.sleep(task);
						} catch (InterruptedException e) {
							e.printStackTrace();
						}
					}
				}.start();
				int sleep = random.nextInt(NEW_TASK_SPREAD) + NEW_TASK_MIN;
				Thread.sleep(sleep);
			}
		} finally {
			unregister();
		}
	}
96445
public static void main(String[] args) throws Exception {
        java.io.PrintWriter out = new java.io.PrintWriter(System.out);
        new RuntimeWSDL(new File(args[0]), new File(args[1]), args[2])
                .serialize(out);
        out.flush();
    }
202685
public static void main(String args[]) throws Exception {
        final StringBuffer buffer = new StringBuffer("The lazy fox");
        Thread t1 = new Thread() {
            public void run() {
                synchronized(buffer) {
                    buffer.delete(0,4);
                    buffer.append(" in the middle");
                    System.err.println("Middle");
                    try { Thread.sleep(4000); } catch(Exception e) {}
                    buffer.append(" of fall");
                    System.err.println("Fall");
                }
            }
        };
        Thread t2 = new Thread() {
            public void run() {
                try { Thread.sleep(1000); } catch(Exception e) {}
                buffer.append(" jump over the fence");
                System.err.println("Fence");
            }
        };
        t1.start();
        t2.start();

        t1.join();
        t2.join();
        System.err.println(buffer);
    }
897075
public static void main(String[] args) throws Exception {
		CeUserArgumentProcessor processor = new CeUserArgumentProcessor(); //Responsible for creating a CeMain instance
		processor.process(args);
	}
1125427
public static void main(final String args[]) {
        int exitCode = 1;
        final Setup setup = new Setup();
        try {
            setup.execute(args);
            exitCode = 0;
        } catch (Throwable exc) {
            System.err.println("ERROR: " + exc.getMessage());
        }
        System.exit(exitCode);
    }