On another thread, a poster mentioned something in canon law about voluntary homicide being something that prohibits a man from receiving holy orders. He says that this applies to a soldier who kills an enemy combatant or a judge who imposes a death sentence on a convict. Is this true?
Homicide is the deliberate murder of an innocent person. Killing an enemy in battle and sentencing a murderer to death is not homicide. Besides, even in cases of deliberate homicide, the impediment to holy orders is not absolute. Although it would be extremely rare, the impediment can be dispensed by competent ecclesial authority. For one remarkable example, see the article linked below.
The Redemption of Shane Paul O’Doherty by Kevin Cullen