Package com.google.gson.internal
Class JavaVersion
java.lang.Object
com.google.gson.internal.JavaVersion
Utility to check the major Java version of the current JVM.
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
static boolean
-
Method Details
-
getMajorJavaVersion
public static int getMajorJavaVersion()- Returns:
- the major Java version, i.e. '8' for Java 1.8, '9' for Java 9 etc.
-
isJava9OrLater
public static boolean isJava9OrLater()- Returns:
true
if the application is running on Java 9 or later; andfalse
otherwise.
-