类 JdkVersion
- java.lang.Object
- org.springframework.core.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 reflectionInternal 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
字段概要
字段 修饰符和类型 字段 说明 static int
JAVA_13
已过时。Constant identifying the 1.3.x JVM (JDK 1.3).static int
JAVA_14
已过时。Constant identifying the 1.4.x JVM (J2SE 1.4).static int
JAVA_15
已过时。Constant identifying the 1.5 JVM (Java 5).static int
JAVA_16
已过时。Constant identifying the 1.6 JVM (Java 6).static int
JAVA_17
已过时。Constant identifying the 1.7 JVM (Java 7).static int
JAVA_18
已过时。Constant identifying the 1.8 JVM (Java 8).static int
JAVA_19
已过时。Constant identifying the 1.9 JVM (Java 9).
构造器概要
构造器 构造器 说明 JdkVersion()
已过时。
方法概要
所有方法 静态方法 具体方法 已过时的方法 修饰符和类型 方法 说明 static String
getJavaVersion()
已过时。Return the full Java version string, as returned bySystem.getProperty("java.version")
.static int
getMajorJavaVersion()
已过时。Get the major version code.
构造器详细资料
JdkVersion
public JdkVersion()
已过时。
方法详细资料
getJavaVersion
public static String getJavaVersion()
已过时。Return the full Java version string, as returned bySystem.getProperty("java.version")
.- 返回:
- the full Java version string
- 另请参阅:
System.getProperty(String)
getMajorJavaVersion
public static int getMajorJavaVersion()
已过时。Get the major version code. This means we can do things likeif (getMajorJavaVersion() >= JAVA_17)
.