Despite of his Moravian origin Klapka considered himself a Hungarian. He made his education at the Roman Catholic secondary schools from Kecskemét and Szeged, then he studied in the military school of Karánsebes. His father sent him to Vienna where he served in the Hungarian Nobiliary Royal Bodyguards (Magyar királyi nemesi testőrség), then in the Guards of Vienna, where he became friend with Artúr Görgei. He was an artillery Lieutenant in 1847, when he retired, and returned to Hungary. Here he was sent as lieutenant to the Border Region Division, but soon he disarmed. In 1847 he thought to go to India and to become an officer in the army of one of the Indian kings, but hearing the news about the revolution from Paris from February 1848 he decided to remain in Hungary.