os = guessOS(System.getProperty("os.name")); System.getProperties().put("osgi.os", os);
os = guessOS(FrameworkProperties.getProperty("os.name")); FrameworkProperties.setProperty("osgi.os", os);
	private static void setupSystemContext() {		// if the user didn't set the locale with a command line argument then use the default.		nl = System.getProperty("osgi.nl"); //$NON-NLS-1$		if (nl != null) {			StringTokenizer tokenizer = new StringTokenizer(nl, "_"); //$NON-NLS-1$			int segments = tokenizer.countTokens();			try {				Locale userLocale = null;				switch (segments) {					case 1 :						// use the 2 arg constructor to maintain compatibility with 1.3.1						userLocale = new Locale(tokenizer.nextToken(), ""); //$NON-NLS-1$						break;					case 2 :						userLocale = new Locale(tokenizer.nextToken(), tokenizer.nextToken());						break;					case 3 :						userLocale = new Locale(tokenizer.nextToken(), tokenizer.nextToken(), tokenizer.nextToken());						break;					default :						// if the user passed us in a bogus value then log a message and use the default						System.err.println(NLS.bind(EclipseAdaptorMsg.error_badNL, nl)); 						userLocale = Locale.getDefault();						break;				}				Locale.setDefault(userLocale);				System.getProperties().put("osgi.nl.user", nl); //$NON-NLS-1$			} catch (NoSuchElementException e) {				// fall through and use the default			}		}		nl = Locale.getDefault().toString();		System.getProperties().put("osgi.nl", nl); //$NON-NLS-1$		// if the user didn't set the operating system with a command line 		// argument then use the default.		os = System.getProperty("osgi.os"); //$NON-NLS-1$		if (os == null) {			os = guessOS(System.getProperty("os.name"));//$NON-NLS-1$);			System.getProperties().put("osgi.os", os); //$NON-NLS-1$		}		// if the user didn't set the window system with a command line 		// argument then use the default.		ws = System.getProperty("osgi.ws"); //$NON-NLS-1$		if (ws == null) {			ws = guessWS(os);			System.getProperties().put("osgi.ws", ws); //$NON-NLS-1$		}		// if the user didn't set the system architecture with a command line 		// argument then use the default.		arch = System.getProperty("osgi.arch"); //$NON-NLS-1$		if (arch == null) {			String name = System.getProperty("os.arch");//$NON-NLS-1$			// Map i386 architecture to x86			if (name.equalsIgnoreCase(INTERNAL_ARCH_I386))				arch = Constants.ARCH_X86;			// Map amd64 architecture to x86_64			else if (name.equalsIgnoreCase(INTERNAL_AMD64))				arch = Constants.ARCH_X86_64;			else				arch = name;			System.getProperties().put("osgi.arch", arch); //$NON-NLS-1$					}	}