Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] it is possible to load config.ini from a different location other than -configuration ?

Hi again Thomas,

I did a debug again. The only place in the source that I was able to find a code that loads a config.ini file was in the method: org.eclipse.osgi.internal.framework.EquinoxContainer.loadConfig(EquinoxConfiguration, EquinoxLocations)

private static void loadConfig(EquinoxConfiguration equinoxConfig, EquinoxLocations equinoxLocations) {
        if (Boolean.TRUE.toString().equals(equinoxConfig.getConfiguration(EquinoxConfiguration.PROP_IGNORE_USER_CONFIGURATION)))
            return;
        Location configArea = equinoxLocations.getConfigurationLocation();
        if (configArea == null)
            return;

        URL location = null;
        try {
            location = new URL(configArea.getURL().toExternalForm() + CONFIG_FILE);
        } catch (MalformedURLException e) {
            // its ok.  This should never happen
        }
        equinoxConfig.mergeConfiguration(loadProperties(location, equinoxConfig));
    }

besides the parent location (from osgi.sharedConfiguration.area ) were calculated, nothing was loaded from there.

regards,

Cristiano

Back to the top