Well, it depends. The military has a special judicial system for giving penalties, up to discharge from the armed forces, so it is always handled through the military system. We don't have military courts, if you call it that. We have special punishment within the armed forces, but it's not as high as in civilian cases.
If it's over a certain level—and this is laid down in German laws—then it's handed to the civilian side. They will carry out a normal prosecution of it by prosecutor and then a normal judgment, and then it goes back to the military. Then, in the military, the decision is made whether, in addition to the punishment given in the civilian court, there is also a need for special military punishment, which means a cut in rank or maybe even a discharge from active service.