Package org.codehaus.mojo.jaxb2.shared
Class JavaVersion
java.lang.Object
org.codehaus.mojo.jaxb2.shared.JavaVersion
Helper to extract the runtime Java version from the System.properties.
- Since:
- 2.4
- Author:
- Lennart Jörelid
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intRetrieves the major java runtime version as an integer.static booleanChecks if the runtime java version is JDK 8 or lower.
-
Constructor Details
-
JavaVersion
public JavaVersion()
-
-
Method Details
-
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.
-