Package org.codehaus.mojo.jaxb2.shared
Class JavaVersion
- java.lang.Object
-
- org.codehaus.mojo.jaxb2.shared.JavaVersion
-
public final class JavaVersion extends java.lang.Object
Helper to extract the runtime Java version from the System.properties.- Since:
- 2.4
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
JAVA_VERSION_PROPERTY
-
Constructor Summary
Constructors Constructor Description JavaVersion()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
getJavaMajorVersion()
Retrieves the major java runtime version as an integer.static boolean
isJdk8OrLower()
Checks if the runtime java version is JDK 8 or lower.
-
-
-
Field Detail
-
JAVA_VERSION_PROPERTY
private static final java.lang.String JAVA_VERSION_PROPERTY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getJavaMajorVersion
public static int getJavaMajorVersion()
Retrieves the major java runtime version as an integer.- Returns:
- the major java runtime version as an integer.
-
isJdk8OrLower
public static boolean isJdk8OrLower()
Checks if the runtime java version is JDK 8 or lower.- Returns:
- true if the runtime java version is JDK 8 or lower.
-
-