public static List<String> getCommandLine(
     MemcachedConfig config, IExtractedFileSet memcachedExecutable, File pidFile)
     throws UnknownHostException {
   List<String> ret = new ArrayList<String>();
   ret.addAll(
       Arrays.asList(
           memcachedExecutable.executable().getAbsolutePath(), //
           "-vv", // to get status output
           // "-d", // daemon
           "-p",
           "" + config.net().getPort(), //
           "-P",
           pidFile.getAbsolutePath() //
           ));
   logger.fine("Executable: " + memcachedExecutable.executable().getAbsolutePath());
   return ret;
 }
 @Override
 protected List<String> getCommandLine(
     Distribution distribution, NodejsConfig config, IExtractedFileSet exe) throws IOException {
   List<String> commandLine = new ArrayList<String>();
   commandLine.add(exe.executable().getAbsolutePath());
   commandLine.add(config.getFilename());
   commandLine.addAll(config.getParameters());
   return commandLine;
 }
  public static List<String> getCommandLine(IMongoImportConfig config, IExtractedFileSet files)
      throws UnknownHostException {
    List<String> ret = new ArrayList<String>();
    ret.addAll(Arrays.asList(files.executable().getAbsolutePath()));
    if (config.cmdOptions().isVerbose()) {
      ret.add("-v");
    }
    Net net = config.net();
    ret.add("--port");
    ret.add("" + net.getPort());
    if (net.isIpv6()) {
      ret.add("--ipv6");
    }
    if (net.getBindIp() != null) {
      ret.add("--host");
      ret.add(net.getBindIp());
    }

    if (config.getDatabaseName() != null) {
      ret.add("--db");
      ret.add(config.getDatabaseName());
    }
    if (config.getCollectionName() != null) {
      ret.add("--collection");
      ret.add(config.getCollectionName());
    }
    if (config.isJsonArray()) {
      ret.add("--jsonArray");
    }
    if (config.isDropCollection()) {
      ret.add("--drop");
    }
    if (config.isUpsertDocuments()) {
      ret.add("--upsert");
    }
    if (config.getImportFile() != null) {
      ret.add("--file");
      ret.add(config.getImportFile());
    }
    if (config.isHeaderline()) {
      ret.add("--headerline");
    }
    if (config.getType() != null) {
      ret.add("--type");
      ret.add(config.getType());
    }

    return ret;
  }
 private void markAllLibraryFilesExecutable() {
   for (File f : executable.files(FileType.Library)) {
     f.setExecutable(true);
   }
 }