Joseph Fraunhofer was the 11th child, born in Straubing, in the Electorate of Bavaria, to Franz Xaver Fraunhofer and Maria Anna Frohlich. He was orphaned at the age of 11 and started working as an apprentice to a harsh glassmaker named Philipp Anton Weichelsberger. In 1801, the workshop in which he was working collapsed, and he was buried in the rubble. The rescue operation was led by Prince-Elector Maximilian Joseph. The prince entered Fraunhofer's life, providing him with books and forcing his employer to allow the young Fraunhofer time to study.