The Runjanin family originates from Loznica, but had moved to Slavonia where Josif Runjanin was born on 8 December 1821. Runjanin went to primary school in Vinkovci and Srijemski Karlovci, only to opt for a military profession after that. As an imperial cadet, Runjanin served in Glina and it was there in the house of Peleš that, surrounded by Illyrian patriots, he composed a tune to Antun Mihanović’s lyrics Horvacka domovina (Croatian Homeland).
Excited by the sonority and elegance of Mihanović’s lyrics, Runjanin decided to set them to music and was assisted in it by other guests. The song was soon widely accepted among people and soldiers and was often sung in pubs throughout the Military Frontier (Krajina). Colonel Josip Jelačić, who was also in Glina at the time, was taken by the song and asked his military bandmaster Josip Wendl to adjust it to a march. But the song spread throughout Croatia only after composer Vatroslav Lichtenegger rewrote and published in a collection of music for the male choir (Sbirka različitih četveropjevah mužkoga sbora) in 1861.
Three decades later, in 1891, the Croatian-Slavonian Economic Society organised a major economic exhibition sponsored by the Zagreb Mayor Milan Amruš at the site of today’s Marshal Tito Square. Early in September, under the auspices of the exhibition, the Croatian Singers’ Alliance organised a festival at which the Croatian anthem was to be chosen. There were three nominees: Bože živi blagoslovi (Living God, Bless) lyrics by Petar Preradović and music by Ivan Zajc, Hrvatska himna (Croatian Anthem) written Hugo Badalić put to music by Ivan Zajc and Horvatska domovina by Antun Mihanović with music by Josif Runjanin. The audience reacted with most enthusiasm on hearing the very initial verses of the third, which has since been the Croatian anthem known as Lijepa naša domovino (Our Beautiful Homeland). Having died in Novi Sad in 1878, Runjanin did not live to see his work declared the Croatian anthem.
Unfortunately, his authorship of the music set to the lyrics of Lijepa naša domovino cannot be ascertained to this day. Matters are made no easier by the fact that all the original music by Runjanin, Wendel and Lichtenegger has been lost permanently.
As a representative of the First Ban (vice-royal) Regiment, Runjanin entered the Croatian Sabor (parliament) in 1865. On retirement, he withdrew from public life and lived in Novi Sad, where he was also buried.