Class OperatingSystemUtils


  • public final class OperatingSystemUtils
    extends java.lang.Object
    NOTE: This class was copied from plexus-utils, to allow this library to stand completely self-contained.
    Version:
    $Id$
    Author:
    Trygve Laugstøl
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Properties getSystemEnvVars()  
      static java.util.Properties getSystemEnvVars​(boolean caseSensitive)
      Return the shell environment variables.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getSystemEnvVars

        public static java.util.Properties getSystemEnvVars()
                                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • getSystemEnvVars

        public static java.util.Properties getSystemEnvVars​(boolean caseSensitive)
                                                     throws java.io.IOException
        Return the shell environment variables. If caseSensitive == true, then envar keys will all be upper-case.
        Parameters:
        caseSensitive - Whether environment variable keys should be treated case-sensitively.
        Returns:
        Properties object of (possibly modified) envar keys mapped to their values.
        Throws:
        java.io.IOException