public static void launch(String[] args) throws Exception {

		GhidraApplicationLayout layout = initializeGhidraEnvironment();

		// Make sure the thing to launch meets the criteria:
		// 1) Class exists
		// 2) Class implements GhidraLaunchable
		// 3) Class has a 0-argument constructor
		Class<?> cls;
		try {
			cls = ClassLoader.getSystemClassLoader().loadClass(args[0]);
		}
		catch (ClassNotFoundException e) {
			throw new IllegalArgumentException("\"" + args[0] + "\" class was not found");
		}
		if (!GhidraLaunchable.class.isAssignableFrom(cls)) {
			throw new IllegalArgumentException("\"" + args[0] + "\" is not a launchable class");
		}
		Constructor<?> constructor;
		try {
			constructor = cls.getConstructor();
		}
		catch (NoSuchMethodException e) {
			throw new IllegalArgumentException(
				"\"" + args[0] + "\" does not have a 0-argument constructor");
		}

		// Launch the target class, which is the first argument.  Strip off the first argument
		// and pass the rest through to the target class's launch method.
		GhidraLaunchable launchable = (GhidraLaunchable) constructor.newInstance();
		launchable.launch(layout, Arrays.copyOfRange(args, 1, args.length));
	}
Launches the given {@link GhidraLaunchable} specified in the first command line argument

@param args The first argument is the name of the {@link GhidraLaunchable} to launch.
  The remaining args get passed through to the class's {@link GhidraLaunchable#launch} 
  method.
@throws Exception If there was a problem launching.  See the exception's message for more
    details on what went wrong.
Ghidra/Framework/Utility/src/main/java/ghidra/GhidraLauncher.java