This snippets gets the local folder for a plugin:
public static File getPluginFolder() {
if(pluginFolder == null) {
URL url = Platform.getBundle("my.plugin.id").getEntry("/");
try {
url = Platform.resolve(url);
}
catch(IOException ex) {
ex.printStackTrace();
}
pluginFolder = new File(url.getPath());
}
return pluginFolder;
}