public synchronized void attachFragment(BundleFragment fragment) throws BundleException { ExportPackageDescription[] exports = proxy.getBundleDescription().getSelectedExports(); if (classloader == null) { initializeExports(exports, exportedPackages); return; } String[] classpath = fragment.getBundleData().getClassPath(); if (classpath != null) classloader.attachFragment( fragment.getBundleData(), fragment.getProtectionDomain(), classpath); initializeExports(exports, exportedPackages); }