m_command.add("-D" + key + "=\"" + value + "\"");
m_command.add("-D" + key + "=" + value);
  public WorkerProcessCommandLine(GrinderProperties properties,                                  Properties systemProperties,                                  File alternateFile) {    m_command = new ArrayList();    m_command.add(properties.getProperty("grinder.jvm", "java"));    final String jvmArguments =      properties.getProperty("grinder.jvm.arguments");    if (jvmArguments != null) {      // Really should allow whitespace to be escaped/quoted.      final StringTokenizer tokenizer = new StringTokenizer(jvmArguments);      while (tokenizer.hasMoreTokens()) {        m_command.add(tokenizer.nextToken());      }    }    // Pass through any "grinder" system properties.    final Iterator systemPropertiesIterator =      systemProperties.entrySet().iterator();    while (systemPropertiesIterator.hasNext()) {      final Map.Entry entry = (Map.Entry)systemPropertiesIterator.next();      final String key = (String)entry.getKey();      final String value = (String)entry.getValue();      if (key.startsWith("grinder.")) {        m_command.add("-D" + key + "=\"" + value + "\"");      }    }    final String additionalClasspath =      properties.getProperty("grinder.jvm.classpath", null);    final String systemClasspath =      systemProperties.getProperty("java.class.path");    final StringBuffer classpath = new StringBuffer();    if (additionalClasspath != null) {      classpath.append(additionalClasspath);    }    if (additionalClasspath != null && systemClasspath != null) {      classpath.append(File.pathSeparatorChar);    }    if (systemClasspath != null) {      classpath.append(systemClasspath);    }    if (classpath.length() > 0) {      m_command.add("-classpath");      m_command.add(classpath.toString());    }    m_command.add(GrinderProcess.class.getName());    m_commandGrinderIDIndex = m_command.size();    m_command.add("<grinderID>"); // Place holder for grinder ID.    if (alternateFile != null) {      m_command.add(alternateFile.getPath());    }  }