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
*
	 * @param context the {@link IRunnableContext}
	 * @return <code>true</code> if a main class is specified and valid
	 */
	public boolean isMainClassValid(IRunnableContext context) {
		return JarPackagerUtil.isMainClassValid(this, context);
	}
	/**
	 * Tells whether directory entries are added to the jar.
	 * 
	 * @return	<code>true</code> if directory entries are to be included
	 * 
	 * @since 3.1
	 */
	public boolean areDirectoryEntriesIncluded() {
		return fIncludeDirectoryEntries;
	}
	/**
	 * Sets the option to include directory entries into the jar.
	 * 
	 * @param includeDirectoryEntries <code>true<code> to include
	 *  directory entries <code>false</code> otherwise
	 *  
	 *  @since 3.1
	 */
	public void setIncludeDirectoryEntries(boolean includeDirectoryEntries) {
		fIncludeDirectoryEntries = includeDirectoryEntries;
	}
}