code: public static String normalizeDriveLetter(String file) {
          if (file.length() > 2 && file.charAt(1) == ':') {
              return Character.toUpperCase(file.charAt(0)) + file.substring(1);
          } else if (file.length() > 3 && file.charAt(0) == '*'
                     && file.charAt(2) == ':') {
              // Handle a wildcard * at the beginning of the string.
              return file.substring(0, 1) + Character.toUpperCase(file.charAt(1))
                     + file.substring(2);
          }
          return file;
      }
docs: Normalize windows drive letter paths to upper case to enable string
  comparison.
  
  @param file File name to normalize
  @return The normalized string if file has a drive letter at the beginning,
  otherwise the original string.