The contribution of solvent-solvent hydrogen bonding and van der Waals interactions to the attraction between methane molecules in water was investigated by comparing the potential of mean force (PMF) between two methane molecules in TIP4P water to those in a series of related liquids in which the solvent-solvent interactions were progressively turned off while keeping the solvent-solute interactions unchanged. The magnitude of the attraction between methanes was not significantly changed when the hydrogen bonding interaction between solvent molecules was eliminated and the solvent was maintained in the liquid state by increasing either the pressure or the magnitude of the solvent-solvent van der Waals interaction. However, when solvent-solvent excluded volume interactions were eliminated, the methane molecules interacted no more strongly than in the gas phase. The results are consistent with the idea that the primary contribution of hydrogen bonding to the hydrophobic interaction is to keep water molecules in a liquid state; at constant density, packing interactions rather than hydrogen bonding appear to be critical as suggested by scaled particle theories of solvation. The overall shape of the PMF was, however, changed in the absence of hydrogen bonding, pointing to an influence of hydrogen bonding on the detailed form of the interactions between nonpolar solutes in water. The effects of correlations between the configurations sampled during the Monte Carlo procedure used in the free energy calculations on the estimation of errors was also characterized.