public static void main()

in taverna-commandline-launcher/src/main/java/org/apache/taverna/commandline/TavernaCommandLine.java [64:102]


	public static void main(final String[] args) {
		try {
			CommandLineOptions commandLineOptions = new CommandLineOptionsImpl(args);
			if (commandLineOptions.askedForHelp()) {
				commandLineOptions.displayHelp();
				System.exit(0);
			} else {
				log4jConfiguration.setApplicationConfiguration(applicationConfiguration);
				log4jConfiguration.prepareLog4J();
				setDerbyPaths();
				OsgiLauncher osgilauncher = new OsgiLauncher(getAppDirectory(), getBundleURIs());
				setFrameworkConfiguration(osgilauncher);
				osgilauncher.start();
				BundleContext context = osgilauncher.getContext();
				context.registerService("org.apache.taverna.commandline.options.CommandLineOptions",
						commandLineOptions, null);
				osgilauncher.startServices(true);
				if (commandlineBundle == null) {
					System.err.println("Can't locate command line bundle " + COMMANDLINE_BUNDLE_NAME);
					System.exit(1);
				}
				osgilauncher.startBundle(osgilauncher.installBundle(commandlineBundle.toURI()));
			}
		} catch (ArgumentsParsingException e) {
			System.err.println(e.getMessage());
                        System.exit(2);
		} catch (InvalidOptionException e) {
			System.err.println(e.getMessage());
                        System.exit(3);
		} catch (BundleException e) {
			System.err.println(e.getMessage());
                        e.printStackTrace();
                        System.exit(4);
                } catch (Throwable e) {
			System.err.println(e.getMessage());
                        e.printStackTrace();
                        System.exit(5);
		}
	}