Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Modifying @user.home location
Modifying @user.home location [message #481886] Mon, 24 August 2009 15:50
Frank Kurzawa is currently offline Frank KurzawaFriend
Messages: 7
Registered: July 2009
Junior Member
When an RCP app detects that it is in a read-only/server environment, it
writes configuration information to @user.home.

According to the documentation, @user.home is simply taken from the
System.property "user.home". In a windows XP environment (for example),
this would be something like "C:\Documents and Settings\<user name>".

We need to modify this behavior so that in a read-only environment, the
configuration information is written elsewhere (but with no change to
behavior in a local, non-read-only, installation).

I've concluded this can't be done with simple config.ini modification b/c
keys such as "osgi.configuration.area" end up applying in both the
read-only and non-read-only situation.

So it seemed that simply redefining the user.home java property at startup
could be an elegant solution.

I implemented a tiny plugin that simply redefines the user.home java
property in it's start method, and I set up config.ini to start it early.
I've verified that it does in fact modify the jvm user.home property, but
apparently I have not gotten it to run early enough in the startup process
to redefine rcp behavior: configuration information is still being written
to the older user.home location.

So here are my questions:
1. Is there a more straightforward way to redirect the location of
configuration information in the read-only/server case w/o changing
behavior in the local-install case?

2. If I am on the right track, how can I get my plug-in to run earlier
than it already is? (Or am I on a fool's errand w/ this approach?)
Right now, my config.ini includes the following:
osgi.bundles=com.MYAPP.startup@1:start,org.eclipse.equinox.common@2:start,org.eclipse.update.configurator@3:start,org.eclipse.core.runtime@start


Thanks in advance,
Frank
Previous Topic:org.osgi.framework.BundleException: State change in progress for bundle ...
Next Topic:Why my bundle is always in state resolved initially
Goto Forum:
  


Current Time: Tue Apr 23 06:39:43 GMT 2024

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

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

Back to the top