Assume that you have a file like "config.xml" and the structure of your
bundle is like this:
org/
foo/
resource/
config.xml
The only thing you need to do to make this available for to other
bundles is put the following in your bundle's manifest:
Export-Package: org.foo.resource
Now the bundles wanting to use this file have to have this in their
manifest:
Import-Package: org.foo.resource
So the above is exactly as if it were code. To actually use it, they
would have to do something like:
this.getClass().getResource("org/foo/resource/config.xml");
This will give them a URL to the resource which they can then read the
content from an input stream. That's it.
-> richard
ribeiant wrote:
Thank you for the answer. The update works and the bundle with only a file
will be updated correctly.
But now I have another problem. I would like that the other bundles use this
file. How can I import this file, so that the others bundles can use it?
Thank you for help
Antonio
Richard S. Hall wrote:
Creating such a bundle is the same as creating any bundle. You would
just organize your resources into packages as if they were code and
export the packages of the resources that you want to be externally
visible. Updating such a bundle is the same as if it had code.
-> richard
ribeiant wrote:
Hi
I would like to create a bundle, that contain only a resource file
(without
java code). Is it possible? If yes, can you tell me how? How can I update
such bundle?
Thank you
Antonio
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]