String windowsExecName = getWindowsExecutableName();
if (windowsExecName == null || windowsExecName.length() == 0) {
windowsExecName = getExecutableName() + ".exe";
}
Path path = context.getEnvironment().getPath();
Collection<FileValue> elementsCopy = path.getElementsCopy();
for (FileValue fileValue : elementsCopy) {
File asFile = fileValue.getAsFile();
if (asFile.exists() && asFile.isDirectory()) {
File file = new File(asFile, windowsExecName);
if (file.exists()) {