Abstract: Measurements are presented of the lifetimes of the B 0, Bs0, ?b0, and Bc+ hadrons using the decay channels B0?J/?K?(892)0, B0?J/?KS0, Bs0?J/??+?-, Bs0?J/??(1020), ?b0?J/??0, and Bc+?J/??+. The data sample, corresponding to an integrated luminosity of 19.7fb-1, was collected by the CMS detector at the LHC in proton?proton collisions at s=8TeV. The B 0 lifetime is measured to be 453.0±1.6(stat)±1.8(syst)?m in J / ?K ?(892) 0and 457.8±2.7(stat)±2.8(syst)?m in J/?KS0, which results in a combined measurement of c?B0=454.1±1.4(stat)±1.7(syst)?m. The effective lifetime of the Bs0 meson is measured in two decay modes, with contributions from different amounts of the heavy and light eigenstates. This results in two different measured lifetimes: c?Bs0?J/??+?-=502.7±10.2(stat)±3.4(syst)?m and c?Bs0?J/??(1020)=443.9±2.0(stat)±1.5(syst)?m. The ?b0 lifetime is found to be 442.9±8.2(stat)±2.8(syst)?m. The precision from each of these channels is as good as or better than previous measurements. The Bc+ lifetime, measured with respect to the B + to reduce the systematic uncertainty, is 162.3±7.8(stat)±4.2(syst)±0.1(?B+)?m. All results are in agreement with current world-average values.