Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » custom osgi JRE profile for RCP app?(how to use osgi.java.profile in config.ini)
custom osgi JRE profile for RCP app? [message #653500] Thu, 10 February 2011 01:22 Go to next message
Gergely Nagy is currently offline Gergely NagyFriend
Messages: 17
Registered: July 2009
Junior Member
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 22:39]

Report message to a moderator

Re: custom osgi JRE profile for RCP app? [message #654190 is a reply to message #653500] Mon, 14 February 2011 14:40 Go to previous message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 503
Registered: July 2009
Senior Member
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.
Previous Topic:p2 dropins - advised or not advised?
Next Topic:Problem with FrameworkLauncher on shared server
Goto Forum:
  


Current Time: Thu Apr 25 13:01:24 GMT 2024

Powered by FUDForum. Page generated in 0.02658 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top