Package org.springframework.core
Class JdkVersion
- java.lang.Object
- org.springframework.core.JdkVersion
@Deprecated public abstract class JdkVersion extends Object
Deprecated.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.
- Author:
- Rod Johnson, Juergen Hoeller, Rick Evans, Sam Brannen
Field Summary
Fields Modifier and Type Field Description static int
JAVA_13
Deprecated.Constant identifying the 1.3.x JVM (JDK 1.3).static int
JAVA_14
Deprecated.Constant identifying the 1.4.x JVM (J2SE 1.4).static int
JAVA_15
Deprecated.Constant identifying the 1.5 JVM (Java 5).static int
JAVA_16
Deprecated.Constant identifying the 1.6 JVM (Java 6).static int
JAVA_17
Deprecated.Constant identifying the 1.7 JVM (Java 7).static int
JAVA_18
Deprecated.Constant identifying the 1.8 JVM (Java 8).static int
JAVA_19
Deprecated.Constant identifying the 1.9 JVM (Java 9).
Constructor Summary
Constructors Constructor Description JdkVersion()
Deprecated.
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static String
getJavaVersion()
Deprecated.Return the full Java version string, as returned bySystem.getProperty("java.version")
.static int
getMajorJavaVersion()
Deprecated.Get the major version code.
Field Detail
JAVA_13
public static final int JAVA_13
Deprecated.Constant identifying the 1.3.x JVM (JDK 1.3).- See Also:
- Constant Field Values
JAVA_14
public static final int JAVA_14
Deprecated.Constant identifying the 1.4.x JVM (J2SE 1.4).- See Also:
- Constant Field Values
JAVA_15
public static final int JAVA_15
Deprecated.Constant identifying the 1.5 JVM (Java 5).- See Also:
- Constant Field Values
JAVA_16
public static final int JAVA_16
Deprecated.Constant identifying the 1.6 JVM (Java 6).- See Also:
- Constant Field Values
JAVA_17
public static final int JAVA_17
Deprecated.Constant identifying the 1.7 JVM (Java 7).- See Also:
- Constant Field Values
JAVA_18
public static final int JAVA_18
Deprecated.Constant identifying the 1.8 JVM (Java 8).- See Also:
- Constant Field Values
JAVA_19
public static final int JAVA_19
Deprecated.Constant identifying the 1.9 JVM (Java 9).- See Also:
- Constant Field Values
Constructor Detail
JdkVersion
public JdkVersion()
Deprecated.
Method Detail
getJavaVersion
public static String getJavaVersion()
Deprecated.Return the full Java version string, as returned bySystem.getProperty("java.version")
.- Returns:
- the full Java version string
- See Also:
System.getProperty(String)
getMajorJavaVersion
public static int getMajorJavaVersion()
Deprecated.Get the major version code. This means we can do things likeif (getMajorJavaVersion() >= JAVA_17)
.