Bug 82804 Jar creation should use less memory
I noticed that the JarWriter will read the entire file it plans to store into memory. An optimization would be to stream the file directly into the JarOutputStream. The only catch is with STORED items which need the CRC32 computed. A penalty could be taken in that case to compute the CRC in a loop and then stream the file.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/jarpackager/JarPackageData.java
/**
	 * Creates and returns a JarWriter for this JAR package.
	 *
	 * @param parent	the shell used to display question dialogs,
	 *				 	or <code>null</code> if "false/no/cancel" is the answer
	 * 					and no dialog should be shown
	 * @return a JarWriter
	 * @see JarWriter
	 */
	public JarWriter createJarWriter(Shell parent) throws CoreException {
		return new JarWriter(this, parent);
	}
	
	/**
	 * Creates and returns a JarExportRunnable.
	 *
	 * @param	parent	the parent for the dialog,
	 * 			or <code>null</code> if no questions should be asked and
	 * 			no checks for unsaved files should be made.
	 * @return a JarExportRunnable
	 */
	public IJarExportRunnable createJarExportRunnable(Shell parent) {
		return new JarFileExportOperation(this, parent);
	}
	
	/**
	 * Creates and returns a JarExportRunnable for a list of JAR package
	 * data objects.
	 *
	 * @param	jarPackagesData	an array with JAR package data objects