Among men, it is ordinarily understood as a virtue by which we give to every one what is his due, what we owe him.
God does not owe, nor can He owe anything to anyone.
Whatever there is outside of God is the creature of God, and the Creator cannot owe anything to His creature.
The justice of God is in this, that He loves good and hates evil, and hence He rewards the good and punishes the evil.
He does so necessarily, because both His love and His hatred are necessarily operative not merely in affection.
New Catholic Dictionary