public final class SysUtils
extends java.lang.Object
SysUtils class provides utility methods to interact with the environment.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
MICROTESK_HOME
Name of the environment variable that stores the path to MicroTESK home folder.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getCurrentDir()
Results current directory path.
|
static java.lang.String |
getHomeDir()
Returns the path to MicroTESK home folder.
|
static java.net.URL |
getResourceUrl(java.lang.String resourceName)
Returns an URL for the specified resource file stored in
microtesk.jar. |
static java.lang.Object |
loadFromModel(java.lang.String className)
Loads a class with the specified name from
models.jar. |
static Model |
loadModel(java.lang.String modelName)
Loads a model with the specified name from
models.jar. |
static Plugin |
loadPlugin(java.lang.String className)
Loads a plug-in implemented by the specified class from
microtesk.jar. |
public static final java.lang.String MICROTESK_HOME
public static java.lang.String getHomeDir()
null if the MICROTESK_HOME
variable that stores this information is not defined in the system.public static java.lang.String getCurrentDir()
public static Model loadModel(java.lang.String modelName)
models.jar.modelName - Model name.null if the model class is not found or
cannot be instantiated.java.lang.IllegalArgumentException - if the argument is null.public static java.lang.Object loadFromModel(java.lang.String className)
models.jar. Prints messages
if any errors occur.className - Name of the class to be loaded.null if the class is
not found or cannot be instantiated.java.lang.IllegalArgumentException - if the argument is null.public static Plugin loadPlugin(java.lang.String className)
microtesk.jar.
Prints a message if any error occur.className - Name of the plug-in class.null if the class is not found
or cannot be instantiated.java.lang.IllegalArgumentException - if the argument is null.public static java.net.URL getResourceUrl(java.lang.String resourceName)
microtesk.jar.resourceName - Resource file name.java.lang.IllegalArgumentException - if the argument is null.