Package 

Class Platform

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public enum Platform.GC
    • Method Summary

      Modifier and Type Method Description
      static boolean isJavaVersion(int major)
      static boolean isJavaVersion(int major, int minor)
      static boolean isJavaVersion(int major, int minor, int update)
      static boolean isJavaVersionAtLeast(int major)
      static boolean isJavaVersionAtLeast(int major, int minor)
      static boolean isJavaVersionAtLeast(int major, int minor, int update)
      static boolean isJavaVersionBetween(int fromMajor, int toMajor) Check if the Java version is between {@code fromMajor} (inclusive) and {@code toMajor} (exclusive).
      static boolean isJavaVersionBetween(int fromMajor, int fromMinor, int toMajor, int toMinor) Check if the Java version is between {@code fromMajor.fromMinor} (inclusive) and {@code * toMajor.toMinor} (exclusive).
      static boolean isJavaVersionBetween(int fromMajor, int fromMinor, int fromUpdate, int toMajor, int toMinor, int toUpdate) Check if the Java version is between {@code fromMajor.fromMinor.fromUpdate} (inclusive) and {@code toMajor.toMinor.toUpdate} (exclusive).
      static boolean isOracleJDK8()
      static boolean isJ9()
      static boolean isIbm8()
      static boolean isGraalVM()
      static String getLangVersion()
      static String getRuntimeVendor()
      static String getRuntimeVersion()
      static String getRuntimePatches()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • isJavaVersion

         static boolean isJavaVersion(int major, int minor)
      • isJavaVersion

         static boolean isJavaVersion(int major, int minor, int update)
      • isJavaVersionBetween

         static boolean isJavaVersionBetween(int fromMajor, int toMajor)

        Check if the Java version is between {@code fromMajor} (inclusive) and {@code toMajor} (exclusive).

        Parameters:
        fromMajor - major from version (inclusive)
        toMajor - major to version (exclusive)
      • isJavaVersionBetween

         static boolean isJavaVersionBetween(int fromMajor, int fromMinor, int toMajor, int toMinor)

        Check if the Java version is between {@code fromMajor.fromMinor} (inclusive) and {@code * toMajor.toMinor} (exclusive).

        Parameters:
        fromMajor - major from version (inclusive)
        fromMinor - minor from version (inclusive)
        toMajor - major to version (exclusive)
        toMinor - minor to version (exclusive)
      • isJavaVersionBetween

         static boolean isJavaVersionBetween(int fromMajor, int fromMinor, int fromUpdate, int toMajor, int toMinor, int toUpdate)

        Check if the Java version is between {@code fromMajor.fromMinor.fromUpdate} (inclusive) and {@code toMajor.toMinor.toUpdate} (exclusive).

        Parameters:
        fromMajor - major from version (inclusive)
        fromMinor - minor from version (inclusive)
        fromUpdate - update from version (inclusive)
        toMajor - major to version (exclusive)
        toMinor - minor to version (exclusive)
        toUpdate - update to version (exclusive)
      • isJ9

         static boolean isJ9()
      • isIbm8

         static boolean isIbm8()