Bug 37197 Basepath for relative pathes in JAR-exporter
The basepath for the JAR-exporter is the eclipse-install-directory. I prefer it to be the root of the project (the description is saved in), so that relative pathes end inside the project. Now: <jardesc> <jar path="workspace/projectdir/jar.jar"/> Desired: <jardesc> <jar path="jar.jar"/> Reason: To make the jardesc-files portable for shared projects
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/jarpackager/JarWriter.java
* @param	contents		the bytes to write
	 * @param	lastModified	a long which represents the last modification date
     * @throws	IOException		if an I/O error has occurred
	 */
	protected void write(IPath path, byte[] contents, long lastModified) throws IOException {
		JarEntry newEntry= new JarEntry(path.toString().replace(File.separatorChar, '/'));
		if (fJarPackage.isCompressed())
			newEntry.setMethod(JarEntry.DEFLATED);
			
		else {
			newEntry.setMethod(JarEntry.STORED);
			newEntry.setSize(contents.length);
			CRC32 checksumCalculator= new CRC32();
			checksumCalculator.update(contents);
			newEntry.setCrc(checksumCalculator.getValue());
		}
		
		
		newEntry.setTime(lastModified);
		try {		
			fJarOutputStream.putNextEntry(newEntry);
			fJarOutputStream.write(contents);
		} finally  {
			/*
			 * Commented out because some JREs throw an NPE if a stream
			 * is closed twice. This works because
			 * a) putNextEntry closes the previous entry
			 * b) closing the stream closes the last entry
			 */