The static dielectric constant of liquid water is computed using classical force field based molecular dynamics simulation at fixed electric displacement D. The method to constrain the electric displacement is the finite temperature classical variant of the constant-D method developed by Stengel, Spaldin and Vanderbilt [Nat. Phys. 5, 304, (2009)]. There is also a modification of this scheme imposing fixed values of the macroscopic field E. The method is applied to the popular SPC/E model of liquid water. We compare four different estimates of the dielectric constant, two obtained from fluctuations of the polarization at D = 0 and E = 0 and two from the variation of polarization with finite D and E. It is found that all four estimates agree when properly converged. The computational effort to achieve convergence varies however, with constant D calculations being substantially more efficient. We attribute this difference to the much shorter relaxation time of longitudinal polarization compared to transverse polarization accelerating constant D calculations.