@Nullable public static File findExecutableFile(File parent,String name){
  if (SystemInfo.isWindows || SystemInfo.isOS2) {
    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;
}

@ Nullable public static File findExecutableFile ( File parent , String name ) { if ( SystemInfo . isWindows || SystemInfo . isOS2 ) { 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 ; }
finds a file that looks executable : an . exe or . cmd under windows , plain file under * nix .
