[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.equinox] Modifying @user.home location

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