code: public static boolean isJavaVersionAtLeast(String expectedVersion) {
  
      String actualVersionDigits = StringUtils.getDigits(System.getProperty("java.version"));
  
      String expectedVersionDigits = StringUtils.pad(StringUtils.getDigits(expectedVersion), '0',
        actualVersionDigits.length());
  
      try {
        return (Long.parseLong(actualVersionDigits) >= Long.parseLong(expectedVersionDigits));
      }
      catch (NumberFormatException ignore) {
        return false;
      }
    }
docs: Utility method to determine if the installed Java Runtime Environment (JRE) meets the minimum expected version.
  Java versions are typically of the form "1.8.0_66".  The Java version is determined by the "java.version"
  System property.
  
  @param expectedVersion a numerical String value specifying the expected minimum version
  of the installed Java Runtime Environment.
  @return a boolean value indicating if the Java Runtime Environment meets the expected minimum version requirement.
  @see java.lang.System#getProperty(String)