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
ByteArrayOutputStream manifestOutput= new ByteArrayOutputStream();
		ByteArrayInputStream fileInput= null;
		try {
			Manifest manifest= fJarPackage.getManifestProvider().create(fJarPackage);
			manifest.write(manifestOutput);
			fileInput= new ByteArrayInputStream(manifestOutput.toByteArray());
			IFile manifestFile= fJarPackage.getManifestFile();
			if (manifestFile.isAccessible()) {
				if (fJarPackage.allowOverwrite() || JarPackagerUtil.askForOverwritePermission(fParentShell, manifestFile.getFullPath().toString()))
					manifestFile.setContents(fileInput, true, true, null);
			} else
				manifestFile.create(fileInput, true, null);
		} finally {
			if (manifestOutput != null)
				manifestOutput.close();
			if (fileInput != null)
				fileInput.close();
		}
	}
	
	private boolean isAutoBuilding() {
		return ResourcesPlugin.getWorkspace().getDescription().isAutoBuilding();
	}
	private boolean isCompilerGeneratingSourceFileAttribute() {
		Object value= JavaCore.getOptions().get(JavaCore.COMPILER_SOURCE_FILE_ATTR);
		if (value instanceof String)
			return "generate".equalsIgnoreCase((String)value); 
		else
			return true; 
	}