War is, in general, a horrible, ugly thing.
Still, it may sometimes be necessary, and therefore justified and just.
There are two cases in which a war may be just:
1) Self-defense – a natural, inborn right of any living creature, and
2) Fighting against evil.
People tend to ignore the reality of evil.
It is not just a relative and imaginary power; evil does exist, in many ways, and ignoring it or disapproving of it will never make it disappear.
There is a time to fight evil by any means, including war.
Another very important consideration, even if it is a just war, is how effective will that particular war be.
It may happen that a just war does not achieve its purpose, and will therefore cast a doubt about how it is conducted.
These are the practical, or what one may call tactical, problems of war.
Even so, there are certainly times when war is just because the only way to fight a force of evil is to destroy it.
–Rabbi Adin Steinsaltz