static bool isOnPATH(S cmd) { S path = System.getenv("PATH"); L dirs = splitAt(path, File.pathSeparator); S c = isWindows() ? cmd + ".exe" : cmd; for (S dir : dirs) if (new File(dir, c).isFile()) ret true; ret false; }