private void saveDir(File dir, JarOutputStream jos, File parent) throws IOException {
		String replacement = parent.getPath() + File.separator;
		for(File file : dir.listFiles()) {
			if(file.isDirectory()) {
				saveDir(file, jos, parent);
				continue;
			}
			
			JarEntry je = new JarEntry(file.getPath().replace(replacement, "").replace(File.separatorChar, '/'));
			jos.putNextEntry(je);
			FileInputStream in = new FileInputStream(file);
			int read;
			while((read = in.read()) != -1) {
				jos.write(read);
			}
			in.close();
			jos.closeEntry();
		}
	}