类 JdkVersion


  • @Deprecated
    public abstract class JdkVersion
    extends Object
    已过时。
    as of Spring 4.2.1, in favor of direct checks for the desired JDK API variants via reflection
    Internal helper class used to find the Java/JVM version that Spring is operating on, to allow for automatically adapting to the present platform's capabilities.

    Note that Spring requires JVM 1.6 or higher, as of Spring 4.0.

    作者:
    Rod Johnson, Juergen Hoeller, Rick Evans, Sam Brannen
    • 字段详细资料

      • JAVA_13

        public static final int JAVA_13
        已过时。
        Constant identifying the 1.3.x JVM (JDK 1.3).
        另请参阅:
        常量字段值
      • JAVA_14

        public static final int JAVA_14
        已过时。
        Constant identifying the 1.4.x JVM (J2SE 1.4).
        另请参阅:
        常量字段值
      • JAVA_15

        public static final int JAVA_15
        已过时。
        Constant identifying the 1.5 JVM (Java 5).
        另请参阅:
        常量字段值
      • JAVA_16

        public static final int JAVA_16
        已过时。
        Constant identifying the 1.6 JVM (Java 6).
        另请参阅:
        常量字段值
      • JAVA_17

        public static final int JAVA_17
        已过时。
        Constant identifying the 1.7 JVM (Java 7).
        另请参阅:
        常量字段值
      • JAVA_18

        public static final int JAVA_18
        已过时。
        Constant identifying the 1.8 JVM (Java 8).
        另请参阅:
        常量字段值
      • JAVA_19

        public static final int JAVA_19
        已过时。
        Constant identifying the 1.9 JVM (Java 9).
        另请参阅:
        常量字段值
    • 构造器详细资料

    • 方法详细资料

      • getMajorJavaVersion

        public static int getMajorJavaVersion()
        已过时。
        Get the major version code. This means we can do things like if (getMajorJavaVersion() >= JAVA_17).
        返回:
        a code comparable to the JAVA_XX codes in this class
        另请参阅:
        JAVA_16, JAVA_17, JAVA_18, JAVA_19