code: protected PackagedProgram buildProgram(CommandLine line) {
  		String[] programArgs = line.hasOption(ARGS_OPTION.getOpt()) ?
  				line.getOptionValues(ARGS_OPTION.getOpt()) :
  				line.getArgs();
  	
  		// take the jar file from the option, or as the first trailing parameter (if available)
  		String jarFilePath = null;
  		if (line.hasOption(JAR_OPTION.getOpt())) {
  			jarFilePath = line.getOptionValue(JAR_OPTION.getOpt());
  		}
  		else if (programArgs.length > 0) {
  			jarFilePath = programArgs[0];
  			programArgs = Arrays.copyOfRange(programArgs, 1, programArgs.length);
  		}
  		else {
  			System.out.println("Error: Jar file is not set.");
  			return null;
  		}
  		
  		File jarFile = new File(jarFilePath);
  		
  		// Check if JAR file exists
  		if (!jarFile.exists()) {
  			System.out.println("Error: Jar file does not exist.");
  			return null;
  		}
  		else if (!jarFile.isFile()) {
  			System.out.println("Error: Jar file is not a file.");
  			return null;
  		}
  		
  		// Get assembler class
  		String entryPointClass = line.hasOption(CLASS_OPTION.getOpt()) ?
  				line.getOptionValue(CLASS_OPTION.getOpt()) :
  				null;
  				
  		try {
  			return entryPointClass == null ? 
  					new PackagedProgram(jarFile, programArgs) :
  					new PackagedProgram(jarFile, entryPointClass, programArgs);
  		} catch (ProgramInvocationException e) {
  			handleError(e);
  			return null;
  		}
  	}
docs: @param line
  
  @return Either a PackagedProgram (upon success), or null;