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
return fUseSourceFolderHierarchy;
	}
	
	/**
	 * Set the option to export the source folder hierarchy.
	 * 
	 * @param state the new state
	 */
	public void setUseSourceFolderHierarchy(boolean state) {
		fUseSourceFolderHierarchy= state;
	}
	
	/**
	 * Gets the absolute location of the JAR file.
	 * This path is normally external to the workspace.
	 * 
	 * @return the absolute path representing the location of the JAR file
	 * 
	 * @since 3.0
	 */
	public IPath getAbsoluteJarLocation() {
		IPath workspaceLocation= ResourcesPlugin.getWorkspace().getRoot().getLocation();
		if (!fJarLocation.isAbsolute() && workspaceLocation != null)
			
			return workspaceLocation.append(fJarLocation);
		else
			return fJarLocation;
	}
	/**
	 * Gets the location of the JAR file.