读取导出的rcp eclipse产品中的文件

时间:2023-01-12 13:53:38

I am developing an Eclipse RCP application and in some cases I need to read some template files where I have stored inside some of the bundles.

我正在开发一个Eclipse RCP应用程序,在某些情况下,我需要阅读一些模板文件,我已经存储在一些包中。

I tried many approaches and they work ok when executing the code but without sucess when I export the product since probably the bundles are exported as jars and it cannot access the stored folders/files...

我尝试了很多方法,它们在执行代码时工作正常但在导出产品时没有成功,因为捆绑包可能导出为jar并且无法访问存储的文件夹/文件...

I tried both approaches suggested here: http://www.vogella.com/blog/2010/07/06/reading-resources-from-plugin/

我试过这里建议的两种方法:http://www.vogella.com/blog/2010/07/06/reading-resources-from-plugin/

Also it will be much easier if I could see these errors before exporting the product if you have any suggestions

如果您有任何建议,如果我在导出产品之前看到这些错误会更容易

1 个解决方案

#1


0  

Ok, so the problem was that I didn't select the folder with the files in the manifest.mf for the build.

好吧,问题是我没有选择包含manifest.mf中文件的文件夹进行构建。

But it was really confusing because code runs when not exported which means it doesnt use the build configuration for the plugin.

但它确实令人困惑,因为代码在未导出时运行,这意味着它不会使用插件的构建配置。

http://www.eclipsezone.com/eclipse/forums/t115424.html

#1


0  

Ok, so the problem was that I didn't select the folder with the files in the manifest.mf for the build.

好吧,问题是我没有选择包含manifest.mf中文件的文件夹进行构建。

But it was really confusing because code runs when not exported which means it doesnt use the build configuration for the plugin.

但它确实令人困惑,因为代码在未导出时运行,这意味着它不会使用插件的构建配置。

http://www.eclipsezone.com/eclipse/forums/t115424.html