The crystalline lens and cornea comprise the eye's optical system for focusing light in human vision. The changes in biomechanical properties of the lens and cornea are closely associated with common diseases, including presbyopia and cataract. Currently, most in vivo elasticity studies of the anterior eye focus on the measurement of the cornea, while lens measurement remains challenging. To better understand the anterior segment of the eye, we developed an optical coherence elastography system utilizing acoustic radiation force excitation to simultaneously assess the elasticities of the crystalline lens and the cornea in vivo. A swept light source was integrated into the system to provide an enhanced imaging range that covers both the lens and the cornea. Additionally, the oblique imaging approach combined with orthogonal excitation also improved the image quality. The system was tested through first ex vivo and then in vivo experiments using a rabbit model. The elasticities of corneal and lens tissue in an excised normal whole-globe and a cold cataract model were measured to reveal that cataractous lenses have a higher Young's modulus. Simultaneous in vivo elasticity measurements of the lens and cornea were performed in a rabbit model to demonstrate the correlations between elasticity and intraocular pressure and between elasticity and age. To the best of our knowledge, we demonstrated the first in vivo elasticity of imaging of both the lens and cornea using acoustic radiation force-optical coherence elastography, thereby providing a potential powerful clinical tool to advance ophthalmic research in disorders affecting the lens and the cornea.