Enum StandardSystemProperty

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<StandardSystemProperty>

    public enum StandardSystemProperty
    extends java.lang.Enum<StandardSystemProperty>
    Represents a standard system property.
    Since:
    15.0
    • Enum Constant Detail

      • JAVA_VM_SPECIFICATION_VERSION

        public static final StandardSystemProperty JAVA_VM_SPECIFICATION_VERSION
        Java Virtual Machine specification version.
      • JAVA_VM_SPECIFICATION_VENDOR

        public static final StandardSystemProperty JAVA_VM_SPECIFICATION_VENDOR
        Java Virtual Machine specification vendor.
      • JAVA_VM_SPECIFICATION_NAME

        public static final StandardSystemProperty JAVA_VM_SPECIFICATION_NAME
        Java Virtual Machine specification name.
      • JAVA_VM_VERSION

        public static final StandardSystemProperty JAVA_VM_VERSION
        Java Virtual Machine implementation version.
      • JAVA_VM_VENDOR

        public static final StandardSystemProperty JAVA_VM_VENDOR
        Java Virtual Machine implementation vendor.
      • JAVA_VM_NAME

        public static final StandardSystemProperty JAVA_VM_NAME
        Java Virtual Machine implementation name.
      • JAVA_SPECIFICATION_VERSION

        public static final StandardSystemProperty JAVA_SPECIFICATION_VERSION
        Java Runtime Environment specification version.
      • JAVA_SPECIFICATION_VENDOR

        public static final StandardSystemProperty JAVA_SPECIFICATION_VENDOR
        Java Runtime Environment specification vendor.
      • JAVA_SPECIFICATION_NAME

        public static final StandardSystemProperty JAVA_SPECIFICATION_NAME
        Java Runtime Environment specification name.
      • JAVA_CLASS_VERSION

        public static final StandardSystemProperty JAVA_CLASS_VERSION
        Java class format version number.
      • JAVA_LIBRARY_PATH

        public static final StandardSystemProperty JAVA_LIBRARY_PATH
        List of paths to search when loading libraries.
      • JAVA_EXT_DIRS

        @Deprecated
        public static final StandardSystemProperty JAVA_EXT_DIRS
        Deprecated.
        This property was deprecated in Java 8 and removed in Java 9. We do not plan to remove this API from Guava, but if you are using it, it is probably not doing what you want.
        Path of extension directory or directories.
    • Field Detail

      • key

        private final java.lang.String key
    • Constructor Detail

      • StandardSystemProperty

        private StandardSystemProperty​(java.lang.String key)
    • Method Detail

      • values

        public static StandardSystemProperty[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (StandardSystemProperty c : StandardSystemProperty.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static StandardSystemProperty valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • key

        public java.lang.String key()
        Returns the key used to lookup this system property.
      • value

        @CheckForNull
        public java.lang.String value()
        Returns the current value for this system property by delegating to System.getProperty(String).

        The value returned by this method is non-null except in rare circumstances:

        • JAVA_EXT_DIRS was deprecated in Java 8 and removed in Java 9. We have not confirmed whether it is available under older versions.
        • JAVA_COMPILER, while still listed as required as of Java 15, is typically not available even under older version.
        • Any property may be cleared through APIs like System.clearProperty(java.lang.String).
        • Unusual environments like GWT may have their own special handling of system properties.

        Note that StandardSystemProperty does not provide constants for more recently added properties, including:

        • java.vendor.version (added in Java 11, listed as optional as of Java 13)
        • jdk.module.* (added in Java 9, optional)
      • toString

        public java.lang.String toString()
        Returns a string representation of this system property.
        Overrides:
        toString in class java.lang.Enum<StandardSystemProperty>