File (File parent, String name) { if (SystemInfo.isWindows) { for (String suffix : WINDOWS_EXECUTABLE_SUFFIXES) { File file = new File(parent, name + "." + suffix); if (file.exists()) return file; } } else if (SystemInfo.isUnix) { File file = new File(parent, name); if (file.exists()) return file; } return null; }