code: public static void addFileToClassPath(Path file, Configuration conf)
      throws IOException {
      String classpath = conf.get("mapred.job.classpath.files");
      conf.set("mapred.job.classpath.files", classpath == null ? file.toString()
               : classpath + System.getProperty("path.separator") + file.toString());
      URI uri = file.makeQualified(file.getFileSystem(conf)).toUri();
  
      addCacheFile(uri, conf);
    }
docs: Add an file path to the current set of classpath entries It adds the file
  to cache as well.
  
  @param file Path of the file to be added
  @param conf Configuration that contains the classpath setting