|
|
|
Re: How to access/read files bundled in your plug-ins as jar files? [message #503111 is a reply to message #502408] |
Thu, 10 December 2009 17:04  |
Eclipse User |
|
|
|
AL wrote:
> Francis Upton wrote:
>> You can do something like this:
>>
>> Bundle bundle = Platform.getBundle("your.plugin.id"); //$NON-NLS-1$
>> URL url = bundle.getResource("nameoffile");
>>
>>
>
> Same thing as below, where Activator is the activator of the plug-in
> that has the data files?
>
> Bundle bundle = Activator.getDefault().getBundle();
> URL url = bundle.getResource(relative_plugin_filepath);
>
> Will have to test them out with a deployed (jar file) plug-in.
That works! Tested with deployed a plug-in, where my plug-in jar file
contain data files.
|
|
|
Powered by
FUDForum. Page generated in 0.06591 seconds