public class PropertyUtil extends Object
Properties
.Modifier and Type | Method and Description |
---|---|
static Properties |
getProperties(String defaultPropertiesFile) |
static String |
getProperty(String defaultPropertiesFile,
String propertyName,
String fallbackValue)
Returns the specified property given the
propertyName either from
the current user's properties file if it exists or from the given
defaultPropertiesFile . |
public static String getProperty(String defaultPropertiesFile, String propertyName, String fallbackValue)
propertyName
either from
the current user's properties file if it exists or from the given
defaultPropertiesFile
.
The method throws an exception if neither the default nor the machine specific file exists.
defaultPropertiesFile
- the default properties file, must existpropertyName
- the name of the desired propertyfallbackValue
- the fallback value if no property of the given name existspublic static Properties getProperties(String defaultPropertiesFile)
Copyright © 2024. All rights reserved.