ANNAPOLIS, Md. (AP) — Acting Defense Secretary Patrick Shanahan says the new graduates of the U.S. Naval Academy should change the status quo and "set the standard on preventing sexual harassment and assault" among ranks.
The former Boeing executive delivered the commencement address Friday at the school in Annapolis. He also told graduates they should not be afraid of failure.
More than 1,000 midshipmen are graduating. Most will be commissioned as either Navy ensigns or second lieutenants in the Marines.
Shanahan served as the Pentagon's No. 2 official since July 2017 until he was appointed the acting secretary in January. He took over after former Secretary of Defense Jim Mattis resigned in December over policy differences with President Donald Trump.
Mattis will be recognized during the ceremony as an honorary member of the class.
Swipe to see more photos from graduation:
ANNAPOLIS, MARYLAND - MAY 24: A U.S. Navy graduate celebrates as he receives his diploma during a graduation ceremony at the U.S. Naval Academy May 24, 2019 in Annapolis, Maryland. The graduating class are sworn into the Navy as ensigns or into the Marine Corps as second lieutenants in the ceremony. (Photo by Alex Wong/Getty Images)
ANNAPOLIS, MARYLAND - MAY 24: Members of Class of 2019 enter the Navy-Marine Corps Memorial Stadium during a graduation ceremony at the U.S. Naval Academy May 24, 2019 in Annapolis, Maryland. The graduating class will be sworn into the Navy as ensigns or into the Marine Corps as second lieutenants in the ceremony. (Photo by Alex Wong/Getty Images)
ANNAPOLIS, MARYLAND - MAY 24: US Navy's Blue Angels fly over the Navy-Marine Corps Memorial Stadium during a graduation ceremony at the U.S. Naval Academy May 24, 2019 in Annapolis, Maryland. The graduating class will be sworn into the Navy as ensigns or into the Marine Corps as second lieutenants in the ceremony. (Photo by Alex Wong/Getty Images)
ANNAPOLIS, MARYLAND - MAY 24: Midshipmen salute as they listen to the national anthem during a graduation ceremony at the U.S. Naval Academy May 24, 2019 in Annapolis, Maryland. The graduating class will be sworn into the Navy as ensigns or into the Marine Corps as second lieutenants in the ceremony. (Photo by Alex Wong/Getty Images)
ANNAPOLIS, MARYLAND - MAY 24: U.S. Navy graduates are sworn in for commissioning during a graduation ceremony at the U.S. Naval Academy May 24, 2019 in Annapolis, Maryland. The graduating class will be sworn into the Navy as ensigns or into the Marine Corps as second lieutenants in the ceremony. (Photo by Alex Wong/Getty Images)
ANNAPOLIS, MARYLAND - MAY 24: A U.S. Navy graduate celebrates as he receives his diploma during a graduation ceremony at the U.S. Naval Academy May 24, 2019 in Annapolis, Maryland. The graduating class are sworn into the Navy as ensigns or into the Marine Corps as second lieutenants in the ceremony. (Photo by Alex Wong/Getty Images)
ANNAPOLIS, MARYLAND - MAY 24: A U.S. Marine Corps graduate waves as she receives her diploma during a graduation ceremony at the U.S. Naval Academy May 24, 2019 in Annapolis, Maryland. The graduating class are sworn into the Navy as ensigns or into the Marine Corps as second lieutenants in the ceremony. (Photo by Alex Wong/Getty Images)
ANNAPOLIS, MARYLAND - MAY 24: U.S. Marine Corps graduates are sworn in for commissioning during a graduation ceremony at the U.S. Naval Academy May 24, 2019 in Annapolis, Maryland. The graduating class will be sworn into the Navy as ensigns or into the Marine Corps as second lieutenants in the ceremony. (Photo by Alex Wong/Getty Images)
ANNAPOLIS, MARYLAND - MAY 24: Acting U.S. Defense Secretary Patrick Shanahan speaks during a graduation ceremony at the U.S. Naval Academy May 24, 2019 in Annapolis, Maryland. The graduating class will be sworn into the Navy as ensigns or into the Marine Corps as second lieutenants in the ceremony. (Photo by Alex Wong/Getty Images)
ANNAPOLIS, MARYLAND - MAY 24: Midshipmen salute as they listen to the national anthem during a graduation ceremony at the U.S. Naval Academy May 24, 2019 in Annapolis, Maryland. The graduating class will be sworn into the Navy as ensigns or into the Marine Corps as second lieutenants in the ceremony. (Photo by Alex Wong/Getty Images)
ANNAPOLIS, MARYLAND - MAY 24: Family members watch the Class of 2019 entering the Navy-Marine Corps Memorial Stadium during a graduation ceremony at the U.S. Naval Academy May 24, 2019 in Annapolis, Maryland. The graduating class will be sworn into the Navy as ensigns or into the Marine Corps as second lieutenants in the ceremony. (Photo by Alex Wong/Getty Images)
(© Copyright 2019 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)