Rabi-type oscillations in a classical Josephson junction