Class SystemUtility

java.lang.Object
com.softwaremining.util.SystemUtility

public class SystemUtility extends Object
Provides operating-system utilities
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
     
    static void
     
    static String
    get the environment variable // * - and then reset to blank to make sure next step/processes cannot get access to it // * This is specially useful for JCL, where a ENV-VAR such as SYSOUT may be assigned in one step, but should not be used in next step (where it could also be applicable).
    static String
    getenv(String env, boolean showNotFoundError)
     
    static String
    get the environment variable - don't show error if no variavle found // * - and then reset to blank to make sure next step/processes cannot get access to it // * This is specially useful for JCL, where a ENV-VAR such as SYSOUT may be assigned in one step, but should not be used in next step (where it could also be applicable).
    static void
    set Environment variables.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SystemUtility

      public SystemUtility()
  • Method Details

    • setEnvironmentVars

      public static void setEnvironmentVars(Map<String,String> newEnv)
      set Environment variables.
      Parameters:
      newEnv -
    • getenv

      public static String getenv(String env)
      get the environment variable // * - and then reset to blank to make sure next step/processes cannot get access to it // * This is specially useful for JCL, where a ENV-VAR such as SYSOUT may be assigned in one step, but should not be used in next step (where it could also be applicable). // * @param env
      Returns:
    • getenvNoError

      public static String getenvNoError(String env)
      get the environment variable - don't show error if no variavle found // * - and then reset to blank to make sure next step/processes cannot get access to it // * This is specially useful for JCL, where a ENV-VAR such as SYSOUT may be assigned in one step, but should not be used in next step (where it could also be applicable). // * @param env
      Returns:
    • getenv

      public static String getenv(String env, boolean showNotFoundError)
    • addEnvironmentVars

      public static void addEnvironmentVars(String key, String value)
    • clearEnvironmentVars

      public static void clearEnvironmentVars()