custom osgi JRE profile for RCP app? [message #653500] |
Wed, 09 February 2011 20:22  |
Eclipse User |
|
|
|
For my RCP app, I'd need to override some JRE-packages in my bundle.
I figure the best way is to use org.osgi.framework.system.packages, and switch off boot delegation.
Also it would be nice to keep related settings in my own java execution environment spec (.profile).
Now, I have my.profile, I'd just need to point to it from the config.ini, using osgi.java.profile -- however this takes absolute URL but I'd prefer a relative one, e.g besides the config file. Alternatively I'd like to bundle this file in another plugin - not sure if that's feasible (maybe only through adding a fragment to the system bundle?)
Looking at the code (Framework.java), it would
support relative paths, but only based on the framework dir
- on which I'm not sure I shoud to rely on.
It would be great if the properties supported substitutions like @config.dir (this seems only working for P2), generically; or even better to any system properties a'la ant.
Is there an easier, cleaner, safer way to achieve this?
Thanks for any hints in advance.
[Updated on: Thu, 10 February 2011 17:39] by Moderator
|
|
|
Re: custom osgi JRE profile for RCP app? [message #654190 is a reply to message #653500] |
Mon, 14 February 2011 09:40  |
Eclipse User |
|
|
|
The method org.eclipse.osgi.framework.internal.core.Framework.findInSys temBundle(String)
Is that the code you are looking at? This method tries two things
1) look in the raw systemBundle for an entry to the specified profile (i.e. my.profile)
2) If not found then try to use the class loader of the framework to find the profile. This is where you could use a fragment of the system.bundle to provide your my.profile.
HTH
Tom.
|
|
|
Powered by
FUDForum. Page generated in 0.04195 seconds