[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 Tom,

Yep, I'm not using launcher, I'm calling the jar directly.

I've create an item in bugzilla yesterday before you have answered : https://bugs.eclipse.org/bugs/show_bug.cgi?id=487165

perhaps you could update it ?

btw, I was able to workaround. I've installed the config.ini into the /etc/app and created a symlink to the /var/lib/app. ;)

regards,

Cristiano

On 04/02/2016 11:21, Thomas Watson wrote:
I think this is probably a bug.  Can you open one?  I suspect most folks that use shared configurations are using the equinox launcher which should read the parent config.ini before even invoking the framework.  But here you are not using the equinox launcher, right?

Tom





From:        Cristiano Gavião <cvgaviao@xxxxxxxxx>
To:        equinox-dev@xxxxxxxxxxx
Date:        02/03/2016 02:57 PM
Subject:        Re: [equinox-dev] it is possible to load config.ini from a different location other than -configuration ?
Sent by:        equinox-dev-bounces@xxxxxxxxxxx




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
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/equinox-dev



_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/equinox-dev