public static void collect(FileWriter fw) throws IllegalArgumentException, IOException{
		if(fw == null)
			throw new IllegalArgumentException( "File Writer given can not be null." );

		RuntimeMXBean runtimeBean = ManagementFactory.getRuntimeMXBean();
		Map<String, String> systemProperties = runtimeBean.getSystemProperties();
		int c = systemProperties.size() - 1;
		String patternDef = "   \"%s\": \"%s\"%s\n";
		String patternNDef = "   \"%s\": \"\\n\"%s\n";
		fw.append( "{\n" );
		for(Map.Entry<String, String> entry: systemProperties.entrySet()) {
			if(entry.getKey().equals( "line.separator" )) {
				fw.append( String.format( patternNDef, entry.getKey(), (c-- == 0 ? "" : ",") ) );
			} else {
				fw.append( String.format( patternDef, entry.getKey(), entry.getValue(), (c-- == 0 ? "" : ",") ) );
			}
		}
		fw.append( "}" );
		fw.close();
	}