Universal joints should be replaced by a professional driveline shop. Beating on the caps with a hammer is foolish because it may cause damage and bearing failure. Hitting them with a hammer can knock out needle bearings, wedging them between the cap and joint or losing them entirely. Play it safe and always use a hydraulic press to replace universal joints. Any neighborhood machine shop or repair facility will have a press.