public static boolean zipFolderTo(File folder, File outputLocation) {
		FileOutputStream fOut = null;
		BufferedOutputStream bOut = null;
		ZipArchiveOutputStream tOut = null;
		try {
			outputLocation.mkdirs();
			outputLocation.delete();

			fOut = new FileOutputStream(outputLocation);
			bOut = new BufferedOutputStream(fOut);
			tOut = new ZipArchiveOutputStream(bOut);

            for(File file : folder.listFiles()) {
                addFileToZip(tOut, file, "");
            }
			/*

			ZipFile zipFile = new ZipFile(outputLocation);

			ZipParameters parameters = new ZipParameters();
			parameters.setCompressionMethod(Zip4jConstants.COMP_DEFLATE);
			parameters.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_NORMAL);
			parameters.setIncludeRootFolder(false);

			zipFile.addFolder(folder.getPath(), parameters);*/
		} catch (Exception e) {
			System.out.println("Zip failed");
			e.printStackTrace();

			Object[] options = {"Yes", "No"};
			int n = JOptionPane.showOptionDialog(Globals.getInstance().mainFrame,
					"Zip failed.\nWould you like to manually zip?",
					"Zip failed",
					JOptionPane.YES_NO_OPTION,
					JOptionPane.QUESTION_MESSAGE,
					null,
					options,
					options[1]);
			if(n == 0) {
				try {
					Desktop.getDesktop().open(folder);
					JFileChooser fileChooser = new JFileChooser(folder);
					fileChooser.setFileFilter(new FileNameExtensionFilter("zip files", "zip"));
					int returnVal = fileChooser.showOpenDialog(null);
					if (returnVal == JFileChooser.APPROVE_OPTION) {
						File result = fileChooser.getSelectedFile();
						FileUtils.moveFile(result, outputLocation);
						return true;
					}
				} catch (IOException e1) {
					System.out.println("Explorer open failed");
				}
			}
			return false;
		} finally {
			try {
				tOut.finish();
				tOut.close();
				bOut.close();
				fOut.close();
			} catch (IOException e) {
				System.out.println("Closing of resources in zip method failed");
			}
			System.out.println("Zip done");
			return true;
		}
	}