Java插件开发-取插件下的某个文件

//找到插件所在处
Bundle bundle = Activator.getDefault().getBundle();
//根据插件转义成URL路径 URL url = FileLocator.toFileURL(bundle.getEntry("ZipFileName")); String zipPath = url.getPath(); File zipPathFile = new File(zipPath); if(!zipPathFile.exists()) {
  throw new RuntimeException(""); }

 

posted @ 2016-03-17 16:47  长命百岁  阅读(228)  评论(0编辑  收藏  举报