public static IPackageFragmentRoot addClassFolderWithImport(IJavaProject jproject,String containerName,IPath sourceAttachPath,IPath sourceAttachRoot,File zipFile) throws IOException, CoreException, InvocationTargetException {
  ZipFile file=new ZipFile(zipFile);
  try {
    IPackageFragmentRoot root=addClassFolder(jproject,containerName,sourceAttachPath,sourceAttachRoot);
    importFilesFromZip(file,root.getPath(),null);
    return root;
  }
  finally {
    if (file != null) {
      file.close();
    }
  }
}

public static IPackageFragmentRoot addClassFolderWithImport ( IJavaProject jproject , String containerName , IPath sourceAttachPath , IPath sourceAttachRoot , File zipFile ) throws IOException , CoreException , InvocationTargetException { ZipFile file = new ZipFile ( zipFile ) ; try { IPackageFragmentRoot root = addClassFolder ( jproject , containerName , sourceAttachPath , sourceAttachRoot ) ; importFilesFromZip ( file , root . getPath ( ) , null ) ; return root ; } finally { if ( file != null ) { file . close ( ) ; } } }
creates and adds a class folder to the class path and imports all files contained in the given zip file .
