public static File isCommandPathViable(String path, File extraBinDir) {
		if (path != null) {
			File file = new File(path);

			if (file.isFile()) {
				return file;
			}

			if (path.indexOf(File.separatorChar) == -1) {
				if (extraBinDir != null) {
					file = new File(extraBinDir, path);
					if (file.isFile()) {
						return file;
					}
				}

				String cmdPath = System.getenv("PATH"); //$NON-NLS-1$
				if (cmdPath != null) {
					StringTokenizer tokenizer = new StringTokenizer(cmdPath, File.pathSeparator);

					while (tokenizer.hasMoreTokens()) {
						file = new File(tokenizer.nextToken(), path);
						if (file.isFile()) {
							return file;
						}
					}
				}
			}
		}
		return null;
	}