code: protected void checkAntVersion(Hashtable h)
    {
  
      if (null == h)
        h = new Hashtable();
  
      try
      {
        final String ANT_VERSION_CLASS = "org.apache.tools.ant.Main";
        final String ANT_VERSION_METHOD = "getAntVersion"; // noArgs
        final Class noArgs[] = new Class[0];
  
        Class clazz = ObjectFactory.findProviderClass(
          ANT_VERSION_CLASS, ObjectFactory.findClassLoader(), true);
  
        Method method = clazz.getMethod(ANT_VERSION_METHOD, noArgs);
        Object returnValue = method.invoke(null, new Object[0]);
  
        h.put(VERSION + "ant", (String)returnValue);
      }
      catch (Exception e)
      {
        h.put(VERSION + "ant", CLASS_NOTPRESENT);
      }
    }
docs: Report product version information from Ant.
  
  @param h Hashtable to put information in