访问插件中的资源方式一例

来源:互联网 发布:小浣熊水浒传108将淘宝 编辑:程序博客网 时间:2024/05/21 17:15
 访问插件中的资源方式
URL url = Activator.getDefault().getBundle().getEntry("abcd.txt");

另外还有getResource方法。


使用普通的
File file= new File("abc.txt");

FileReader fr = new FileReader(file);
会报FileNotFoundException异常

原创粉丝点击