简体   繁体   English

在导出RCP日食产品读取文件

[英]Reading files in exported rcp eclipse product

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 如果您有任何建议,也可以在导出产品之前看到这些错误,这将更加容易

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 http://www.eclipsezone.com/eclipse/forums/t115424.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM