static File findCmdOnPATH(S cmd) { S path = System.getenv("PATH"); L dirs = splitAt(path, File.pathSeparator); S c = isWindows() ? addSuffix(cmd, ".exe") : cmd; for (S dir : dirs) { File f = new File(dir, c); if (f.isFile()) ret f; } null; }