 He joined the Jesuits after completing the 'Humanities'.He did his philosophy (1748–51) in Nyaswizh, and then studied mathematics, astronomy and architecture in the Academy of Vilnius (1752–54).This was followed by theology in Warsaw (1754–58) during which he was ordained priest (1757).