Train 151 is the Bogowonto, Ekonomi class only, air-conditioned. The nicest part of the journey from Jakarta to Yogya or Solo comes beyond Cirebon, where the train slows right down and snakes through gentle hills, past rice paddies nestling in narrow valleys amongst the jungle...
There is both a daytime service and a time-effective overnight service, although the night trains have no sleepers - these disappeared from Indonesian trains in the 1990s.
After Semarang there's a brief stretch where the train skirts the Java Sea, and around Cirebon you'll see the vast shadow of Mt Cereme in the distance to the south, its summit usually hidden by cloud.
It's an active volcano and the highest point in west Java.
Both cities should feature on any sensible trip to Java. You can check train times & fares using English) or tiket.id (in Indonesian).
It's easy to travel from Jakarta to Yogya or Solo by comfortable air-conditioned train, indeed it's the best way. Train 7 & 8 is the Argo Lawu, Eksekutif class only, air-conditioned.
Trains 177 & 178 are the Kertajaya, Ekonomi class only, air-conditioned. The Argo Bromo Anggrek (the Bromo Orchid) is Indonesia's premier train, linking Java's two largest cities in 9 hours at a creditable average speed of 80 km/h (50mph) start to stop on its narrow gauge tracks.