Question: what are the conditions necessary for a just war?
Answer: The war must have a just cause - eg against invasion, or for self-defence - and not to acquire wealth or power. The war must be declared and controlled by a proper authority, eg the state or ruler. The war must be fought to promote good or avoid evil, with the aim of restoring peace and justice after the war is over.