EnvironmentInfo.frameworkArgs = new String[0]; EnvironmentInfo.appArgs = args;
EclipseEnvironmentInfo.setFrameworkArgs(new String[0]); EclipseEnvironmentInfo.setAppArgs(args);
	private static String[] processCommandLine(String[] args) throws Exception {		EnvironmentInfo.allArgs = args;		if (args.length == 0) {			EnvironmentInfo.frameworkArgs = args;			EnvironmentInfo.appArgs = args;			return args;		}		int[] configArgs = new int[args.length];		configArgs[0] = -1; // need to initialize the first element to something that could not be an index.		int configArgIndex = 0;		for (int i = 0; i < args.length; i++) {			boolean found = false;			// check for args without parameters (i.e., a flag arg)			// check if debug should be enabled for the entire platform			// If this is the last arg or there is a following arg (i.e., arg+1 has a leading -), 			// simply enable debug.  Otherwise, assume that that the following arg is			// actually the filename of an options file.  This will be processed below.			if (args[i].equalsIgnoreCase(DEBUG) && ((i + 1 == args.length) || ((i + 1 < args.length) && (args[i + 1].startsWith("-"))))) { //$NON-NLS-1$				System.getProperties().put(PROP_DEBUG, ""); //$NON-NLS-1$				debug = true;				found = true;			}			// check if development mode should be enabled for the entire platform			// If this is the last arg or there is a following arg (i.e., arg+1 has a leading -), 			// simply enable development mode.  Otherwise, assume that that the following arg is			// actually some additional development time class path entries.  This will be processed below.			if (args[i].equalsIgnoreCase(DEV) && ((i + 1 == args.length) || ((i + 1 < args.length) && (args[i + 1].startsWith("-"))))) { //$NON-NLS-1$				System.getProperties().put(PROP_DEV, ""); //$NON-NLS-1$				found = true;			}			// look for the initialization arg			if (args[i].equalsIgnoreCase(INITIALIZE)) {				initialize = true;				found = true;			}			// look for the clean flag.			if (args[i].equalsIgnoreCase(CLEAN)) {				System.getProperties().put(PROP_CLEAN, "true"); //$NON-NLS-1$				found = true;			}			// look for the consoleLog flag			if (args[i].equalsIgnoreCase(CONSOLE_LOG)) {				System.getProperties().put(PROP_CONSOLE_LOG, "true"); //$NON-NLS-1$				found = true;			}			// look for the console with no port.  			if (args[i].equalsIgnoreCase(CONSOLE) && ((i + 1 == args.length) || ((i + 1 < args.length) && (args[i + 1].startsWith("-"))))) { //$NON-NLS-1$				System.getProperties().put(PROP_CONSOLE, ""); //$NON-NLS-1$				found = true;			}            if (args[i].equalsIgnoreCase(NOEXIT)) {            	System.getProperties().put(PROP_NOSHUTDOWN, "true"); //$NON-NLS-1$            	found = true;            }            			if (found) {				configArgs[configArgIndex++] = i;				continue;			}			// check for args with parameters. If we are at the last argument or if the next one			// has a '-' as the first character, then we can't have an arg with a parm so continue.			if (i == args.length - 1 || args[i + 1].startsWith("-")) { //$NON-NLS-1$				continue;			}			String arg = args[++i];			// look for the console and port.  			if (args[i - 1].equalsIgnoreCase(CONSOLE)) {				System.getProperties().put(PROP_CONSOLE, arg);				found = true;			}			// look for the configuration location .  			if (args[i - 1].equalsIgnoreCase(CONFIGURATION)) {				System.getProperties().put(LocationManager.PROP_CONFIG_AREA, arg);				found = true;			}			// look for the data location for this instance.  			if (args[i - 1].equalsIgnoreCase(DATA)) {				System.getProperties().put(LocationManager.PROP_INSTANCE_AREA, arg);				found = true;			}			// look for the user location for this instance.  			if (args[i - 1].equalsIgnoreCase(USER)) {				System.getProperties().put(LocationManager.PROP_USER_AREA, arg);				found = true;			}			// look for the development mode and class path entries.  			if (args[i - 1].equalsIgnoreCase(DEV)) {				System.getProperties().put(PROP_DEV, arg);				found = true;			}			// look for the debug mode and option file location.  			if (args[i - 1].equalsIgnoreCase(DEBUG)) {				System.getProperties().put(PROP_DEBUG, arg);				debug = true;				found = true;			}			// look for the window system.  			if (args[i - 1].equalsIgnoreCase(WS)) {				System.getProperties().put(PROP_WS, arg);				found = true;			}			// look for the operating system			if (args[i - 1].equalsIgnoreCase(OS)) {				System.getProperties().put(PROP_OS, arg);				found = true;			}			// look for the system architecture			if (args[i - 1].equalsIgnoreCase(ARCH)) {				System.getProperties().put(PROP_ARCH, arg);				found = true;			}			// look for the nationality/language			if (args[i - 1].equalsIgnoreCase(NL)) {				System.getProperties().put(PROP_NL, arg);				found = true;			}			// done checking for args.  Remember where an arg was found 			if (found) {				configArgs[configArgIndex++] = i - 1;				configArgs[configArgIndex++] = i;			}		}		// remove all the arguments consumed by this argument parsing		if (configArgIndex == 0) {			EnvironmentInfo.frameworkArgs = new String[0];			EnvironmentInfo.appArgs = args;			return args;		}		EnvironmentInfo.appArgs = new String[args.length - configArgIndex];		EnvironmentInfo.frameworkArgs = new String[configArgIndex];		configArgIndex = 0;		int j = 0;		int k = 0;		for (int i = 0; i < args.length; i++) {			if (i == configArgs[configArgIndex]) {				EnvironmentInfo.frameworkArgs[k++] = args[i];				configArgIndex++;			} else				EnvironmentInfo.appArgs[j++] = args[i];		}		return EnvironmentInfo.appArgs;	}