code: public static String jarVersion(Class<?> jarClass) {
      String j2objcVersion = null;
  
      String path = jarClass.getProtectionDomain().getCodeSource().getLocation().getPath();
      try (JarFile jar = new JarFile(URLDecoder.decode(path, "UTF-8"))) {
        Manifest manifest = jar.getManifest();
        j2objcVersion = manifest.getMainAttributes().getValue("version");
      } catch (IOException e) {
        // fall-through
      }
      if (j2objcVersion == null) {
        j2objcVersion = "(j2objc version not available)";
      }
  
      String javacVersion = Parser.newParser(null).version();
      return String.format("%s (javac %s)", j2objcVersion, javacVersion);
    }
docs: Returns the "version" entry from a jar file's manifest, if available.
  If the class isn't in a jar file, or that jar file doesn't define a
  "version" entry, then a "not available" string is returned.
  
  @param jarClass any class from the target jar