Sorry if this is a stupid question.
In OSGi, we can pass a file URL while installing a bundle:
Bundle myBundle = felix.getBundleContext().installBundle ( "file:/Felix/RootDir/MyBundle.jar" );
The URL “file://Felix/RootDir/MyBundle.jar” now uniquely identifies the bundle.
Are we allowed to pass relative URLs? Such as below:
Bundle myBundle = felix.getBundleContext().installBundle ( "file:MyBundle.jar" );
If so, then what is the parent directory of this relative URL? (Is it felix.cache.rootdir?).
If relative URLs are allowed, then does Felix internally convert the relative URL to an absolute URL? That is, if I do:
String locationID = myBundle.getLocation();
will it return the absolute or relative URL?
(Yes, I know that each bundle also has a long int ID too)
The “current directory” for Felix is probably the one in effect when you started it. Also, the framework must not alter the location string you supply to install bundle. So it wont convert the supplied location string to some other value.