The train between Munich, Zagreb and Belgrade takes a stunning route through the Austrian Alps. The journey is made onboard a EuroCity train, which is comfortable, and consists of a mix of Slovenian and Serbian coaches. A restaurant car is usually attached to the train.
If you don't like the sound of this daytime train, there is an overnight sleeper train between Munich and Zagreb, the Lisinki sleeper train.

