military justice as in the uniform code of military justice most nations have a separate code of law which regulates both certain activities allowed only in war as well as provides a code of law applicable only to a soldier in war or in uniform during peacetime