public final class Systems extends Object
| Constructor and Description |
|---|
Systems() |
| Modifier and Type | Method and Description |
|---|---|
static File |
getApplicationRoot(Class<?> bootClass)
Determines the root folder that the application is running from based on the location of class containing the application
main method. |
static String |
getConfig(String envPropName)
Provides a way of retrieving system configuration from either an environment variable first or, if not set, then a Java system property.
|
public static File getApplicationRoot(Class<?> bootClass) throws IllegalArgumentException
main method.bootClass - The class containing the main methodIllegalArgumentExceptionpublic static String getConfig(String envPropName) throws IllegalArgumentException
envPropName - The system configuration value to loadIllegalArgumentException - If the property is not setSystem.getenv(String),
System.getProperty(String)Copyright © 2017. All rights reserved.