Mechanic was installing hydraulic cylinder onto excavator. He removed pin to re-align. The other end of cylinder was suspended by rigging; the other end of cylinder slipped out of the pin socket, swung away suspended then swung back and struck mechanic on the jaw causing fracture to jaw. The mechanic stepped down from ladder and asked for assistance.