private Map<String, Set<JarFile>> buildMapOfExportsToJars() {
        String classPath = System.getProperty("java.class.path");
        String pathSeparator = System.getProperty("path.separator");

        Map<String, Set<JarFile>> exportsToJars = new HashMap<String, Set<JarFile>>();

        String[] classPaths = classPath.split(pathSeparator);
        for (String path: classPaths) {
            if (path.endsWith(".jar")) {
                try {
                    JarFile jarFile = new JarFile(path);
                    Manifest manifest = jarFile.getManifest();
                    
                    if (manifest != null) {
                        OSGiManifestUtil manifestUtil = new OSGiManifestUtil(manifest);
                        if (manifestUtil.isBundle()) {
                            Set<String> exports = manifestUtil.getExports();
                            
                            for (String export: exports) {
                                Set<JarFile> jars = exportsToJars.get(export);
                                if (jars == null) {
                                    jars = new LinkedHashSet<JarFile>(); // keep the order the same as on the classpath
                                    exportsToJars.put(export, jars);
                                }
                                
                                jars.add(jarFile);
                            }
                        }
                    }
                } catch (IOException e) {
                    logger.warn(String.format("could not read jar file: %s", path), e);
                }
            }
        }
        
        return exportsToJars;
    }