Bug 26699 Create Jar fails with no warning if jar read-only
Once *.jardesc has been created, if I invoke "Create JAR" from the context menu and the jar file already exists and is read-only, the progress dialog flashes and nothing more happens. Please add check for this condition and at least an error message should be displayed. Even better, ask something like "Jar file read-only, overwrite?" Y/N and overwrite the file on yes (similar to what the option "warn if jar file exists" does).
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
count += getTotalChildCount((IContainer)resource);
		}
		return count;
	}
	
	private int getTotalChildCount(IContainer container) {
		IResource[] members;
		try {
			members= container.members();
		} catch (CoreException ex) {
			return 0;
		}
		int count= 0;
		for (int i= 0; i < members.length; i++) {
			if (members[i].getType() == IResource.FILE)
				count++;
			else
				count += getTotalChildCount((IContainer)members[i]);
		}
		return count;
	}
	/**
	 * Exports the passed resource to the JAR file
	 *
	 * @param element the resource or JavaElement to export
	 */
	protected void exportElement(Object element, IProgressMonitor progressMonitor) throws InterruptedException {
		int leadSegmentsToRemove= 1;
		IPackageFragmentRoot pkgRoot= null;
		boolean isInJavaProject= false;