public static File locatePluginFile(String path){
  Bundle bundle=Platform.getBundle(CheckerPlugin.PLUGIN_ID);
  Path checkersJAR=new Path(path);
  URL checkersJarURL;
  try {
    checkersJarURL=FileLocator.toFileURL(FileLocator.find(bundle,checkersJAR,null));
  }
 catch (  IOException e) {
    throw new RuntimeException("Exception locating plugin on path: " + path,e);
  }
catch (  NullPointerException npe) {
    throw new RuntimeException("Bundle= " + bundle + " ID="+ CheckerPlugin.PLUGIN_ID+ " checkerJar="+ checkersJAR,npe);
  }
  File checkersJarFile;
  try {
    checkersJarFile=new File(checkersJarURL.toURI());
  }
 catch (  URISyntaxException e) {
    checkersJarFile=new File(checkersJarURL.getPath());
  }
  return checkersJarFile;
}

public static File locatePluginFile ( String path ) { Bundle bundle = Platform . getBundle ( CheckerPlugin . PLUGIN_ID ) ; Path checkersJAR = new Path ( path ) ; URL checkersJarURL ; try { checkersJarURL = FileLocator . toFileURL ( FileLocator . find ( bundle , checkersJAR , null ) ) ; } catch ( IOException e ) { throw new RuntimeException ( "Exception locating plugin on path: " + path , e ) ; } catch ( NullPointerException npe ) { throw new RuntimeException ( "Bundle= " + bundle + " ID=" + CheckerPlugin . PLUGIN_ID + " checkerJar=" + checkersJAR , npe ) ; } File checkersJarFile ; try { checkersJarFile = new File ( checkersJarURL . toURI ( ) ) ; } catch ( URISyntaxException e ) { checkersJarFile = new File ( checkersJarURL . getPath ( ) ) ; } return checkersJarFile ; }
find a file within the plugin directory
