if (args[i].equalsIgnoreCase(CONSOLE)) {
if (args[i].equalsIgnoreCase(CONSOLE) && ((i + 1 == args.length) || ((i + 1 < args.length) && (args[i + 1].startsWith("-"))))) {
	private static String[] processCommandLine(String[] args) throws Exception {		EnvironmentInfo.allArgs = args;		int[] configArgs = new int[100];		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 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("osgi.dev", "");				found = true;				continue;			}				// look for the console with no port.  			if (args[i].equalsIgnoreCase(CONSOLE)) {				console = true;				found = true;				continue;			}			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)) {				console = true;				consolePort = arg;				found = true;				continue;			}				// look for the configuraiton location .  			if (args[i - 1].equalsIgnoreCase(CONFIGURATION)) {				configLocation = arg;				continue;			}				// look for the development mode and class path entries.  			if (args[i - 1].equalsIgnoreCase(DEV)) {				System.getProperties().put("osgi.dev", arg);				found = true;				continue;			}				// look for the data location for this instance.  			if (args[i - 1].equalsIgnoreCase(DATA)) {				dataLocation = arg;				continue;			}				// look for the debug mode and option file location.  			if (args[i - 1].equalsIgnoreCase(ARG_DEBUG)) {				System.getProperties().put("osgi.debug", arg);				DEBUG = true;				found = true;				continue;			}				// look for the window system.  			if (args[i - 1].equalsIgnoreCase(WS)) {				found = true;				System.getProperties().put("osgi.ws", arg);			}				// look for the operating system			if (args[i - 1].equalsIgnoreCase(OS)) {				found = true;				System.getProperties().put("osgi.os", arg);			}				// look for the system architecture			if (args[i - 1].equalsIgnoreCase(ARCH)) {				found = true;				System.getProperties().put("osgi.arch", arg);			}				// look for the nationality/language			if (args[i - 1].equalsIgnoreCase(NL)) {				found = true;				System.getProperties().put("osgi.nl", arg);			}				// 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;	}