Admitted to the bar in 1892, he began his legal practice in Harrisburg, and subsequently became a member of the Pennsylvania State House of Representatives, serving in that capacity from 1915 to 1917.[5][6]
Swartz was elected as a Republican to the Sixty-ninth Congress. He declined to become a candidate for reelection in 1926, and resumed the practice of law until his death in Harrisburg on May 27, 1959. He was buried at the Paxtang Cemetery near Harrisburg.[7][8]
^"Swartz, Joshua William," in Biographical Directory of the United States Congress (CongBio|CongBio|S001097). Washington, D.C.: U.S. House of Representatives, retrieved online August 12, 2024.