|Re: how to extract additional file types from bundle [message #651534 is a reply to message #651521]
||Mon, 31 January 2011 15:24
| Paul Webster
Registered: July 2009
On 01/31/2011 09:34 AM, Ens wrote:|
> In our RCP app, we have a set of data files that are required to be read
> by in by one of our plug-ins. When the plug-in is extracted into
> "configuration/org.eclipse.osgi/bundles", these data files are not
> extracted from the plug-in jar file. How do I add support for these file
> types so they are extracted?
In general, you make sure the files are included in your bundle using
the build.properties file (for files that are in the root of your plugin
project, as resources within the source tree are included automatically).
If they really were resources, you simply use
If they were included in your plugin, you use Bundle.getEntry(*) to get
the InputStream from the URL.
If you need files on the disk ... first I'd ask why, then send you to
FileLocator (which for a given bundle entry, will return a URL that
points to a file on disk).
Powered by FUDForum
. Page generated in 0.01965 seconds