static void optimize(final File f) throws IOException {
		if (f.isDirectory()) {
			File[] files = f.listFiles();
			for (int i = 0; i < files.length; ++i) {
				optimize(files[i]);
			}
		} else if (f.getName().endsWith(".jar")) {
			File g = new File(f.getParentFile(), f.getName() + ".new");
			ZipFile zf = new ZipFile(f);
			ZipOutputStream out = new ZipOutputStream(new FileOutputStream(g));
			Enumeration e = zf.entries();
			byte[] buf = new byte[10000];
			while (e.hasMoreElements()) {
				ZipEntry ze = (ZipEntry) e.nextElement();
				if (ze.isDirectory()) {
					continue;
				}
				out.putNextEntry(ze);
				if (ze.getName().endsWith(".class")) {
					ClassReader cr = new ClassReader(zf.getInputStream(ze));
					// cr.accept(new ClassDump(), 0);
					cr.accept(new ClassVerifier(), 0);
				}
				InputStream is = zf.getInputStream(ze);
				int n;
				do {
					n = is.read(buf, 0, buf.length);
					if (n != -1) {
						out.write(buf, 0, n);
					}
				} while (n != -1);
				out.closeEntry();
			}
			out.close();
			zf.close();
			f.delete();
			g.renameTo(f);
		}
	}