
Early Life and Education
His father was a teacher in Petrinja and taught him the basics of geometry. By 1801, at just 15 years old, he worked as an assistant teacher to his father. That same year, he moved to Vienna and later completed a "geometric" school in Petrinja. Since 1802, he specialized in building mountain roads and their associated infrastructure. He was assigned to Baron Vukasović's regiment, the 48th Infantry Regiment under Field Marshal Filip Vukasović, a renowned builder of the Lujzijana Road (linking Karlovac and Rijeka).

Military Service during the Napoleonic Wars
During the Napoleonic Wars, Knežić held the rank of lieutenant and served as a battalion aide-de-camp. He was wounded near Torun Fortress. In 1810, when Napoleon took control of the Military Frontier, Knežić joined the French service, where he quickly rose to the rank of captain in Turin and fought in Poland.
He served in the French-Illyrian Border Regiment No. 6 and was later transferred to the Karlovac-Slunj Border Regiment No. 4. After 1814, when the Illyrian Provinces returned to Austria, he rejoined the Austrian army and worked as a military engineer in Zadar.

Contributions to Infrastructure
In 1815, Baron Franjo Tomašić, the Austrian governor of Dalmatia, personally requested Knežić's appointment as a military engineer in Zadar. There, Knežić worked under Engineer Hatzinger and was responsible for irrigation projects, regulating the Čikola and Krka rivers, and draining swamps near the Cetina River. He also built and repaired many Dalmatian roads and ports.
From 1825 to October 1832, he led the construction of the Majstorska cesta (Master’s Road) across Velebit, passing through Mali Alan. This road was the first modern road connection between northern and southern Croatia, significantly shortening travel times and integrating Dalmatia with the northern regions. It replaced the poor-quality Venetian routes, and due to the advanced road-building techniques used, it was named Majstorska cesta.
His successful work on mountain roads—including Sv. Rok – Mali Alan – Obrovac and the reconstruction of the Josephina Road (Karlovac – Senj)—led to further assignments. Despite his rapid career advancement, he faced accusations and early retirement due to professional jealousy. However, in 1833, Baron Vlašić, the Ban of Croatia, brought him back to supervise the Josephina Road reconstruction.

Major Projects and Legacy
Knežić designed the two-story stone bridge in Tounj. He spent 20 years working on Velebit and, between 1833 and 1843, built the Chapel of St. Michael near Vratnik as his personal endowment. He also constructed the Imperial Spring Fountain (1837) along the Josephina Road, inscribing it in Croatian, Latin, and German.
In 1841, due to his engineering expertise, Knežić was entrusted with planning a new modern road from Gospić to Karlobag, assisted by his first deputy, Simo Kekić. He also oversaw a second reconstruction of the Josephina Road in 1845 and that same year restored the Senj water supply system and a classical-style fountain.
His third Velebit road (1844–1851) was not completed before his death, but it was well-designed and remains in use today. Alongside these roads, Knežić built special monuments, including a stone fountain at Ljubica Spring and a stone cube monument (Kubus) at Stara vrata Pass.

Death and Memorial
According to his wishes, Knežić was buried in a rock tomb behind the Chapel of St. Michael near Vratnik. In gratitude, the citizens of Senj erected a memorial plaque bearing the inscription:
"Resting place of the earthly remains of Mr. Josip Kajetan Knežić, Imperial Royal Major, Knight of the Austrian Order of Leopold, honorary citizen of the city of Senj, builder of the Velebit, Josephina, and Karlobag roads, and the Senj harbor, born in Petrinja on February 15, 1786, and passed away in Senj on September 15, 1848."
A Croatian poet dedicated a poem to Knežić, published in 1845 in Zagreb. He was also decorated upon the recommendation of Count Nugent in recognition of his outstanding service.
