The following are exempt from military duty: all persons exempted from military duty under the laws of the United States, all judges of the several courts, and the members of the legislature.