import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
+import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.Dictionary;
URL fileURL = bundle.getEntry(jar);
File file = null;
try {
- file = new File(FileLocator.resolve(fileURL).toURI());
+ String urlString = FileLocator.resolve(fileURL).toExternalForm().replace(" ", "%20");;
+ file = new File(new URI(urlString));
JarFile jarFile = new JarFile(file);
Manifest manifest = jarFile.getManifest();
Attributes attributes = manifest.getMainAttributes();
cdmlibVersion = attributes.getValue("Bundle-Version");
cdmlibLastModified = attributes.getValue("Bnd-LastModified");
+ jarFile.close();
if(cdmlibVersion == null || cdmlibLastModified == null) {
throw new IllegalStateException("Invalid cdmlib manifest info");
}