These things are a bit more complicated in Germany. According to
German law, all male citizens and permanent residents from the age of
18 are generally liable to military service. The length of basic
military service in Germany is currently 9 months. Conscripts serve in
the armed forces (army, navy, air force), but not in police forces.
However, German citizens or permanent residents who are drafted but
refuse to serve in the armed forces, for reason of conscience, can do
alternative civilian service instead. The current length of civilian
service is 9 months, too.
Those who are already police officials at the time when they would
normally be drafted don't have to do military service. Their
compulsory service is considered fulfilled the moment they are
accepted as police officials of one of the states' police forces or
the Federal Police.
Members of the Red Cross, auxiliary fire brigades or the THW (German
Federal Agency for Technical Relief) are not drafted, either, provided
they have pledged themselves to actively serve in one of those
organizations for at least 6 years. There are several more regulations
defining exemptions from military service.
Those found physically unfit for military service or rejected for
other reasons are not obliged to do any altenative service instead.
Of all male Germans born in 1980, 31.25% have served in the armed
forces, 34.54% have done alternative civilian service, and 34,2% have
not done any service at all for numerous reasons.
Male German citizens and permanent residents can be drafted for
compulsory basic military service from the age of 18 to the age 23,
with several exceptions that allow draft up to the age of 32. In times
of peace, liability to military service (being called to reserve
maneuvers etc.) ends at the age of 45.
All these regulations apply to men only. Women are not liable to
military of civilian service in Germany.
Hope this answers your question!
Wikipedia: Wehrpflicht - Bundesrepublik Deutschland seit 1956 (in German)