Getting the File URL for Installed Eclipse Bundle

Some times there is a requirement to get the folder or File URL for the installed bundles .

The below snippet can use for this purpose

public static URL getBundleFileURL(Bundle bundle) {
URL u = FileLocator.find(bundle, new Path("/"), null);
try {
return FileLocator.toFileURL(u);
} catch (IOException e) {
// Log error
return null;

Hope it helps!!!

0 opinions: