code: public static void extractJar(JarFile jar, File extractedLocation) throws IOException {		
  		Enumeration<JarEntry> entries = jar.entries();
  		while(entries.hasMoreElements()) {
  			JarEntry entry = entries.nextElement();
  			
  			File destPath = new File(extractedLocation, SEPARATOR + entry.getName());
  
  			// is Directory
  			if(entry.isDirectory()) {
  				log.debug("Creating directory: " + destPath);
  				destPath.mkdirs();
  				continue;
  			}
  			
  			// is File
  			log.debug("Creating parent directories for file: " + destPath);
  			destPath.getParentFile().mkdirs();
  			extractFile(jar, entry, destPath);
  		}
  	}
docs: Creates a 1:1 copy of all contents from a jar file to the specified location on the local filesystem
  @param jar The source jar to extract contents from
  @param extractedLocation The target location for extracted jar contents
  @throws IOException if jar extraction fails IO