code: public static String makeShellPath(String filename) throws IOException {
      if (Path.WINDOWS) {
        return new CygPathCommand(filename).getResult();
      } else {
        return filename;
      }
    }
docs: Convert a os-native filename to a path that works for the shell.
  @param filename The filename to convert
  @return The unix pathname
  @throws IOException on windows, there can be problems with the subprocess