<code>
Bundle bundle = Platform.getBundle(Activator.PLUGIN_ID); URL pluginUrl = Platform.find(bundle, new org.eclipse.core.runtime.Path("plugin.xml")); URL pluginFileUrl = null; try { pluginFileUrl = Platform.asLocalURL(pluginUrl); } catch (IOException e) { e.printStackTrace(); } Path x = new Path(pluginFileUrl.getPath()); Path y = new Path(x.removeLastSegments(1).toString()); File file = new File(y + "//component.xml");
</code>