File parentDir = f.getParentFile(); parentDir.mkdirs();
    public static void expand(String sdir, String jar)        throws MalformedURLException, IOException    {        File dir = new File(sdir);        FileInputStream j = new FileInputStream(jar);	ZipInputStream zis = new ZipInputStream(j);	ZipEntry ze = null;        	while ((ze = zis.getNextEntry()) != null) {            try {		File f = new File(dir, ze.getName());                		if (ze.isDirectory()) {		    f.mkdirs(); 		} else {		    byte[] buffer = new byte[1024];		    int length = 0;		    FileOutputStream fos = new FileOutputStream(f);		    		    while ((length = zis.read(buffer)) >= 0) {			fos.write(buffer, 0, length);		    }		    		    fos.close();		}	    } catch( FileNotFoundException ex ) {		// XXX replace with a call to log() when available		System.out.println("JarUtil: FileNotFoundException: " +  ze.getName() + " / " + jar );                throw(ex);	    }	}	zis.close();    }