code: public static String getJavaVersion() {
          String[] sysPropParms = new String[] {"java.runtime.version", "java.version"};
          for (int i = 0; i < sysPropParms.length; i++) {
              String val = System.getProperty(sysPropParms[i]);
              if (!StringUtil.isEmpty(val)) {
                  return val;
              }
          }
          return null;
      }
docs: Determines the Java version of the executing JVM.
  @return Java version