James B. Franklin, 81, a Loudoun County dairy farmer who was a former pilot and airline executive, died of cardiac arrest June 16 at his home in Purcellville.

He came to the Washington area in the early 1930s and was a dairy farmer in Fairfax County from 1935 until he moved his operation to Loudoun County in 1981. He was a farmer there until his death.

Mr. Franklin, a native of Tennessee, attended what is now Carnegie-Mellon University in Pittsburgh. He served with the Army Air Forces in the Aleutians during World War II.

A barnstorming pilot in the 1920s, he became a commercial pilot in 1934. He flew for the old Pennsylvania Central Airlines, then for Capital Airlines. In 1947, he was named operations director of Capital and later became senior vice president for operations. In 1960, he resigned this post and became a flight captain on DC-4s.

After Capital merged into United Airlines, he became president of the Miami-based Airlift International, a cargo operation. He was president from the early 1960s until retiring from the airline business in the mid-1970s.

While at Capital, he helped introduce the British-built Viscount turboprop airplane.

He was elected to the board of the Fairfax County National Bank in 1958. Over the years, he also had been a director of several aviation, business and farm advisory groups. He had been a member of the Northern Virginia Milk Producers Association and the Loudoun County Planters Club.

Survivors include his wife, the former Jean Schmidt, of Purcellville; two sons, Stanley M., of Vienna, and George B., of Purcellville; two daughters, Phyllis Morris of Morgantown, W.Va., and Barbara Persson of Leesburg; a brother, James Hood Franklin of Jefferson City, Tenn.; a sister, Nancy Bowman of Pittsburgh; seven grandchildren; and a great-grandchild.