code: public synchronized void checkLibraryAvailability(final JobID jobID) throws IOException {
  
  		// Now distribute the required libraries for the job
  		String[] requiredLibraries = LibraryCacheManager.getRequiredJarFiles(jobID);
  
  		if (requiredLibraries == null) {
  			throw new IOException("No entry of required libraries for job " + jobID);
  		}
  
  		LibraryCacheProfileRequest request = new LibraryCacheProfileRequest();
  		request.setRequiredLibraries(requiredLibraries);
  
  		// Send the request
  		LibraryCacheProfileResponse response = null;
  		response = getTaskManagerProxy().getLibraryCacheProfile(request);
  
  		// Check response and transfer libraries if necessary
  		for (int k = 0; k < requiredLibraries.length; k++) {
  			if (!response.isCached(k)) {
  				LibraryCacheUpdate update = new LibraryCacheUpdate(requiredLibraries[k]);
  				getTaskManagerProxy().updateLibraryCache(update);
  			}
  		}
  	}
docs: Checks if all the libraries required to run the job with the given
  job ID are available on this instance. Any libary that is missing
  is transferred to the instance as a result of this call.
  
  @param jobID
  the ID of the job whose libraries are to be checked for
  @throws IOException
  thrown if an error occurs while checking for the libraries