public class JdkVersion
extends java.lang.Object
Title: JdkVersion.java
Description:
bboss workgroup
Copyright (c) 2008
| 限定符和类型 | 字段和说明 |
|---|---|
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 |
| 构造器和说明 |
|---|
JdkVersion() |
| 限定符和类型 | 方法和说明 |
|---|---|
static java.lang.String |
getJavaVersion()
Return the full Java version string, as returned by
System.getProperty("java.version"). |
static int |
getMajorJavaVersion()
Get the major version code.
|
static boolean |
isAtLeastJava14()
Convenience method to determine if the current JVM is at least Java 1.4.
|
static boolean |
isAtLeastJava15()
Convenience method to determine if the current JVM is at least
Java 1.5 (Java 5).
|
static boolean |
isAtLeastJava16()
Convenience method to determine if the current JVM is at least
Java 1.6 (Java 6).
|
public static final int JAVA_13
public static final int JAVA_14
public static final int JAVA_15
public static final int JAVA_16
public static final int JAVA_17
public static final int JAVA_18
public static java.lang.String getJavaVersion()
System.getProperty("java.version").System.getProperty(String)public static int getMajorJavaVersion()
if (getMajorJavaVersion() < JAVA_14).public static boolean isAtLeastJava14()
true if the current JVM is at least Java 1.4getMajorJavaVersion(),
JAVA_14,
JAVA_15,
JAVA_16,
JAVA_17public static boolean isAtLeastJava15()
true if the current JVM is at least Java 1.5getMajorJavaVersion(),
JAVA_15,
JAVA_16,
JAVA_17public static boolean isAtLeastJava16()
true if the current JVM is at least Java 1.6getMajorJavaVersion(),
JAVA_16,
JAVA_17