code: private Program copyProgramJar(final Program program, File programDir) throws IOException {
      File tempJar = File.createTempFile(program.getName(), ".jar");
      Files.copy(new InputSupplier<InputStream>() {
        @Override
        public InputStream getInput() throws IOException {
          return program.getJarLocation().getInputStream();
        }
      }, tempJar);
  
      final Location jarLocation = new LocalLocationFactory().create(tempJar.toURI());
      return Programs.createWithUnpack(jarLocation, programDir);
    }
docs: Copies the program jar to a local temp file and return a {@link Program} instance
  with {@link Program#getJarLocation()} points to the local temp file.