public class PropertiesLoader extends Object
| Constructor and Description |
|---|
PropertiesLoader() |
| Modifier and Type | Method and Description |
|---|---|
static void |
copySystemProperties(org.apache.felix.utils.properties.Properties configProps) |
static org.apache.felix.utils.properties.Properties |
loadConfigProperties(File file)
Loads the configuration properties in the configuration property file
associated with the framework installation; these properties
are accessible to the framework and to bundles and are intended
for configuration purposes.
|
static org.apache.felix.utils.properties.Properties |
loadPropertiesFile(URL configPropURL,
boolean failIfNotFound) |
static org.apache.felix.utils.properties.Properties |
loadPropertiesOrFail(File configFile) |
static void |
loadSystemProperties(File file)
Loads the properties in the system property file associated with the
framework installation into
System.setProperty(). |
public static org.apache.felix.utils.properties.Properties loadConfigProperties(File file) throws Exception
Loads the configuration properties in the configuration property file
associated with the framework installation; these properties
are accessible to the framework and to bundles and are intended
for configuration purposes. By default, the configuration property
file is located in the conf/ directory of the Felix
installation directory and is called "config.properties".
The installation directory of Felix is assumed to be the parent
directory of the felix.jar file as found on the system class
path property. The precise file from which to load configuration
properties can be set by initializing the "felix.config.properties"
system property to an arbitrary URL.
file - the config file where to load the properties.Properties instance or null if there was an error.Exception - if something wrong occurs.public static void loadSystemProperties(File file) throws IOException
Loads the properties in the system property file associated with the
framework installation into System.setProperty(). These properties
are not directly used by the framework in anyway. By default, the system
property file is located in the conf/ directory of the Felix
installation directory and is called "system.properties". The
installation directory of Felix is assumed to be the parent directory of
the felix.jar file as found on the system class path property.
The precise file from which to load system properties can be set by
initializing the "felix.system.properties" system property to an
arbitrary URL.
file - the Karaf base folder.IOException - if the system file can't be loaded.public static void copySystemProperties(org.apache.felix.utils.properties.Properties configProps)
public static org.apache.felix.utils.properties.Properties loadPropertiesOrFail(File configFile)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.