protected Process startJob(Context context, String jobId, String user, String overrideClasspath,
                             LauncherDelegator.JobType jobType)
    throws IOException, InterruptedException {
    Configuration conf = context.getConfiguration();
    copyLocal(COPY_NAME, conf);
    String[] jarArgs = TempletonUtils.decodeArray(conf.get(JAR_ARGS_NAME));

    ArrayList<String> removeEnv = new ArrayList<String>();
    //todo: we really need some comments to explain exactly why each of these is removed
    removeEnv.add("HADOOP_ROOT_LOGGER");
    removeEnv.add("hadoop-command");
    removeEnv.add("CLASS");
    removeEnv.add("mapredcommand");
    Map<String, String> env = TempletonUtils.hadoopUserEnv(user, overrideClasspath);
    handlePigEnvVars(conf, env);
    handleSqoop(conf, env);
    handleHadoopClasspathExtras(conf, env);    
    List<String> jarArgsList = new LinkedList<String>(Arrays.asList(jarArgs));
    handleTokenFile(jarArgsList, JobSubmissionConstants.TOKEN_FILE_ARG_PLACEHOLDER, "mapreduce.job.credentials.binary");
    handleTokenFile(jarArgsList, JobSubmissionConstants.TOKEN_FILE_ARG_PLACEHOLDER_TEZ, "tez.credentials.path");
    if (jobType == LauncherDelegator.JobType.HIVE) {
      Credentials cred = new Credentials();
      Token<? extends TokenIdentifier> token = context.getCredentials().getToken(new
              Text(SecureProxySupport.HIVE_SERVICE));
      cred.addToken(new
              Text(SecureProxySupport.HIVE_SERVICE), token);
      File t = File.createTempFile("templeton", null);
      Path tokenPath = new Path(t.toURI());
      cred.writeTokenStorageFile(tokenPath, conf);
      env.put(UserGroupInformation.HADOOP_TOKEN_FILE_LOCATION,
              tokenPath.toUri().getPath());
      replaceJobTag(jarArgsList, JobSubmissionConstants.HIVE_QUERY_TAG_ARG_PLACEHOLDER,
              JobSubmissionConstants.HIVE_QUERY_TAG, jobId);
    } else {
      replaceJobTag(jarArgsList, JobSubmissionConstants.MAPREDUCE_JOB_TAGS_ARG_PLACEHOLDER,
              JobSubmissionConstants.MAPREDUCE_JOB_TAGS, jobId);
    }

    return TrivialExecService.getInstance().run(jarArgsList, removeEnv, env);
  }
Ensures that {@code paths} are prepended to {@code pathVarName} and made available to forked child
process.
@param paths properly separated list of paths
hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/LaunchMapper.java