John G. Cornwell, 79, retired head of the officer candidate education branch of the Bureau of Naval Personnel, died Wednesday in Hanover, Pa. He had a heart ailment.

He retired in 1969 after 23 years as a civilian employe of the Navy Department. During World War II, he had served at several universities and in Washington as a Navy commander working with the V-12 program.

Mr. Cornwell remained in the Naval Reserves after the war, retiring with the rank of captain in 1963.

He was born in New London, Pa. A graduate of Dickinson College in Carlisle, Pa., he later earned master's degrees from the University of Pennsylvania and Columbia University.

From 1923 until World War II, Mr. Cornwell was with the former Dickinson Junior College, now Lycoming College, in Williamsport, Pa., where he was a chemistry professor and then college dean.*tHe lived in Arlington while working for the Navy Department and moved to Hanover a little more than a year ago. He had been an active member of Foundry Methodist Church here.

He is survived by his wife, Anna, of the home in Hanover; two sons, Dan, of Madison, Wis., and John, of Fairfax, and two grandchildren.