Runtime r = Runtime.getRuntime();
String command = "zip -r " + f.getAbsolutePath() + " " + thesisDir.getName();
Process p = r.exec(command, null, thesisDir.getParentFile());
new ProcessOutputReader(p.getInputStream()).start();
new ProcessOutputReader(p.getErrorStream()).start();
int result = p.waitFor();
return new FileInputStream(f);
}