Justice and Revenge are two different words entirely, while the both seek a fair and balanced treatment to be served on someone who was caught to have committed a crime, the path to follow to get this achieved is totally different. Justice is always driven by the urge for fairness but revenge is usually driven by a lot of negative things like jealousy, hatred.
Getting justice for something requires going through a particular process while revenge won't let you think of following due process. Justice has more positive connotation than revenge which is more of a negative way of getting back at people. Whenever it is justice, it is duly served, but if it is revenge, it can be unduly served. Justice is gotten through lawful means, that's why we have different courts of law for people to turn to and get justice but revenge cannot be achieved through lawful means.