public final class PropertiesUtils
extends java.lang.Object
Reads properties from files, VM arguments or environment variables
Constructor and Description |
---|
PropertiesUtils() |
Modifier and Type | Method and Description |
---|---|
static java.util.Properties |
getPropertiesFromFile(java.lang.String file) |
static java.lang.String |
getProperty(java.lang.String key)
Reads the key value from the VM arguments or environment variables
|
public static java.util.Properties getPropertiesFromFile(java.lang.String file) throws java.lang.Exception
file
- to read the properties fromProperties
java.lang.Exception
- if the file is not accessible or does not existpublic static java.lang.String getProperty(java.lang.String key)
Reads the key value from the VM arguments or environment variables
key
- to read the value of