code: public static void main(String[] args) {
      boolean verbose = args.length == 1 && "-v".equals(args[0]);
      Version version = HBaseVersion.get();
      System.out.println(version.getMajorVersion());
      if (verbose) {
        System.out.println("versionString=" + getVersionString());
      }
    }
docs: Prints out the HBase {@link Version} enum value for the current version of HBase on the classpath.