views:

972

answers:

1

The MANIFEST.MF file contains an entry to define which *.properties files are loaded at runtime. These entry defined name and the corresponding properties file is used to translate the plugin strings which start with the prefix "%", like "%plugin.name"

Bundle-Localization: plugin

plugin.properties than contains a line like

%plugin.name=Runtime Plugin

the properties file also can have the name application.properties, than i have to define

Bundle-Localization: application

Whent he properties files areinside a plugin sub directory "properties" i can define

Bundle-Localization: properties/application


My Question: Can a define a Bundle-Localization pathw which is outside the plugin, like

Bundle-Localization: ../properties/application

It seems, that the ManifestLocalization object which is searching for the properties file path, does ask ZipFile for the path. And ZipPath does not support this functionality.

How can i solve this issue?

+2  A: 

No you can't define a path which is outside the plug-in. Though fragments are considered in addition to the bundle.

In general, bundles aren't tied to a location on disk so you can't really define where a path like ../properties should resolve to. Consider for example a bundle installed using BundleContext#installBundle(String location, InputStream input). The location parameter is the identity of the bundle and there are no semantics tied to it. The content of the bundle is read out of the input stream. What would a path outside of the bundle mean then?

Andrew Niefer