is it possible to hook into the way Equinox loads native libraries? I
think it would be enough for me to hook into the find of the native
library. I would also not like to use hooks, that I have to specify at
the command line but rather one that I could add to the framework during
runtime.
org.eclipse.osgi.baseadaptor.hooks.ClassLoadingHook.findLibr ary(BaseData, String) lets you find a requested library path
org.eclipse.osgi.baseadaptor.hooks.BundleFileWrapperFactoryH ook.wrapBundleFile(BundleFile, Object, BaseData, boolean) lets you wrapper a BundleFile and intercept calls to BundleFile.getEntry which are called when Bundle.findEntries is called.
But I am not sure I understand your statement "I would also not like to use hooks, that I have to specify at the command line but rather one that I could add to the framework during runtime."
If you have a framework extension that contains hook implementations (has a hookconfigurators.properties file) then p2 will install and configure it into the framework automatically. There should be no need to add an command line options.
> But I am not sure I understand your statement "I would also not like to
> use hooks, that I have to specify at the command line but rather one
> that I could add to the framework during runtime."
It means that I would not like to specify command line params to get the
hook activated. Thats what I would need to do, as I read on the hooks
wiki page.
>
> If you have a framework extension that contains hook implementations
> (has a hookconfigurators.properties file) then p2 will install and
> configure it into the framework automatically. There should be no need
> to add an command line options.
And what if I will not use p2? Could I also not simply use a fragement
bundle for the system bundle and implement my hook there?