Package org.codehaus.mojo.jaxb2.shared
Class JavaVersion
- java.lang.Object
-
- org.codehaus.mojo.jaxb2.shared.JavaVersion
-
public final class JavaVersion extends Object
Helper to extract the runtime Java version from the System.properties.- Since:
- 2.4
- Author:
- Lennart Jörelid
-
-
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.
-
-
-
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.
-
-