Bug 9127 JAR Packager: Path of exported resource wrong if src folder not under project
Create J project Create folder /x/y Define y as source folder ==> x/y appears as source folder ==> Files in x don't get exported ==> Path for resource files in x/y/ are wrong (i.e. contain /x/y) Note: *.java and *.class files are exported correctly.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
while (iter.hasNext()) {
			Object element= iter.next();
			IResource resource= null;
			if (element instanceof IJavaElement) {
				IJavaElement je= (IJavaElement)element;
				try {
					resource= je.getUnderlyingResource();
				} catch (JavaModelException ex) {
					addWarning(JarPackagerMessages.getFormattedString("JarFileExportOperation.underlyingResourceNotFound", je.getElementName()), ex); 
					return count;
				}
			}
			else
				resource= (IResource)element;
			if (resource.getType() == IResource.FILE)
				count++;
			else
				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;