Class RuntimeEnvironment


  • public final class RuntimeEnvironment
    extends Object
    A utility class that provides access to OS/runtime environment relate information and operations.
    • Method Detail

      • isInContainer

        public static boolean isInContainer()
        Detect if the application is running inside a container. This is heuristic based and will need to be expanded for different container framerworks.
        Returns:
        True if we thinkk it is in a container
      • getArch

        public static String getArch()
        Get the CPU architecture.
        Returns:
        The CPU architeture
      • getCores

        public static int getCores()
        Return the number of CPU cores.
        Returns:
        The number of cores
      • getTempDir

        public static String getTempDir()
      • getComputerName

        public static String getComputerName()
      • getOsType

        public static RuntimeEnvironment.Type getOsType()
        Apply heuristics to determine the OS type from the os.name system property.
        Returns:
        The OS Type