Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Problem specifying osgi.config.area using symbolic location (@user.home)

If you're setting it manually, you can use the
System.getProperty("user.home") instead.

You might also like to take note from:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=54919
https://bugs.eclipse.org/bugs/show_bug.cgi?id=168445

Many other people are asking for it not to consider using the platform
install area (aka baseConfigurationarea) but somewhere user-specific.
Such requests have generally gone ignored.

However, Vista throws security exceptions when trying to write config
area to a program file location, so it may be that this bug has to be
addressed for that particular issue. But I wouldn't hold your breath.

Alex.

On 21/02/07, Steven E. Harris <seh@xxxxxxxxx> wrote:
I'm experimenting with setting the Equinox configuration area to a
directory other than <install>/configuration. Specifically, I'd like
to take advantage of the symbolic location shortcuts described in "The
Eclipse runtime options".¹

As part of my application startup, while building the properties to
feed to EclipseStarter.setInitialProperties(), I have the following:

  props.setProperty( org.eclipse.core.runtime.adaptor.LocationManager.PROP_CONFIG_AREA,
                     "@user.home/.myapp" );

Now jump over to LocationManager.initializeLocations(). Around line
117, this function calls on mungeConfigurationLocation(), which takes
the "osgi.configuration.area" property and turns it into path by way
of an intermediate URL, apparently with respect to the current working
directory if the property value doesn't look like an absolute path.

Only after mungeConfigurationLocation() toys with the
"osgi.configuration.area" property does buildLocation() get a chance
to operate on it, around line 123 in LocationManager. It's within
buildLocation() that the symbolic location prefixes are expanded. My
attempted use of the prefix "@user.home" gets foiled by
mungeConfigurationLocation(), because by the time we get to
buildLocation(), the "osgi.configuration.area" property looks more
like:

  file:/C:/src/projects/<...>/@user.home/.myapp

Am I misinterpreting the documentation in expecting that this symbolic
location should be respected properly? Is this a bug?


Footnotes:
¹ http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html

--
Steven E. Harris

_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev


Back to the top