Class DefaultProcessingEnvironment

  • Direct Known Subclasses:
    OpenVmsProcessingEnvironment

    public class DefaultProcessingEnvironment
    extends Object
    Helper class to determine the environment variable for the OS. Depending on the JDK the environment variables can be either retrieved directly from the JVM or requires starting a process to get them running an OS command line.
    Version:
    $Id: DefaultProcessingEnvironment.java 1636056 2014-11-01 21:12:52Z ggregory $
    • Field Detail

      • procEnvironment

        protected Map<String,​String> procEnvironment
        the environment variables of the process
    • Constructor Detail

      • DefaultProcessingEnvironment

        public DefaultProcessingEnvironment()
    • Method Detail

      • getProcEnvironment

        public Map<String,​String> getProcEnvironment()
                                                    throws IOException
        Find the list of environment variables for this process.
        Returns:
        a map containing the environment variables
        Throws:
        IOException - obtaining the environment variables failed
      • createProcEnvironment

        protected Map<String,​String> createProcEnvironment()
                                                          throws IOException
        Find the list of environment variables for this process.
        Returns:
        a amp containing the environment variables
        Throws:
        IOException - the operation failed
      • runProcEnvCommand

        @Deprecated
        protected BufferedReader runProcEnvCommand()
                                            throws IOException
        Deprecated.
        No longer needed
        Start a process to list the environment variables.
        Returns:
        a reader containing the output of the process
        Throws:
        IOException - starting the process failed
      • getProcEnvCommand

        @Deprecated
        protected CommandLine getProcEnvCommand()
        Deprecated.
        No longer needed
        Determine the OS specific command line to get a list of environment variables.
        Returns:
        the command line