public static @Nullable JavaVersion getJavaVersion(@NotNull String jreHome) {
    final Sdk configuredJdk = ProjectJdkTable.getInstance().findJdk(jreHome);
    if (configuredJdk != null) {
      return JavaVersion.tryParse(configuredJdk.getVersionString());
    }

    if (JdkUtil.checkForJre(jreHome)) {
      final JavaSdk javaSdk = JavaSdk.getInstance();
      return JavaVersion.tryParse(javaSdk.getVersionString(jreHome));
    }

    return null;
  }
public static @Nullable JavaVersion getJavaVersion(@NotNull String jreHome)