'Hot jupiters,' giant planets with orbits very close to their parent stars, are thought to form farther away and migrate inward via interactions with a massive gas disk. If a giant planet forms and migrates quickly, the planetesimal population has time to re-generate in the lifetime of the disk and terrestrial planets may form [P.J. Armitage, A reduced efficiency of terrestrial planet formation following giant planet migration, Astrophys. J. 582 (2003) L47-L50]. We present results of simulations of terrestrial planet formation in the presence of hot/warm jupiters, broadly defined as having orbital radii ⩽0.5 AU. We show that terrestrial planets similar to those in the Solar System can form around stars with hot/warm jupiters, and can have water contents equal to or higher than the Earth's. For small orbital radii of hot jupiters (e.g., 0.15, 0.25 AU) potentially habitable planets can form, but for semi-major axes of 0.5 AU or greater their formation is suppressed. We show that the presence of an outer giant planet such as Jupiter does not enhance the water content of the terrestrial planets, but rather decreases their formation and water delivery timescales. We speculate that asteroid belts may exist interior to the terrestrial planets in systems with close-in giant planets.