Violence is rarely an option between people to states.
For individuals, violence is the only option if one is physically attacked by another, or, if one feels imminent threat, and all warnings went unheeded.
For sovereignj states, violence is sometimes the only option if all other means of diplomacy are exausted, and on very rare occasions, before it. On the latter occasion, the Six Day War in 1967 represents the only time an undeclared war is justified.
On that year, the Arab armies massed on Israel's border. Prior to that war, it had to fight for its survival in 1948 when 5 Arab armies entered into Israel with the intent to end Israel's independance. In 1956, Egyptian President Abdul Nassar sealed off or took the Suez Canal, and the IDF along with Britain. On to 1967, it appears that Egypt, Jordan and Syria once again intended to attack the Jewish state so without warning, waged a preempted them by striking first.
In truth, the same Egyptian President massed his forces to the border because of a false tip from the Russians that Israel will attack. That caused him to call on his allies prepare for war. He would've withdrawn his forces once he'd come to learn the truth of it, but his people demanding revenge, wanted him to fight. The Israelis I think, tried to defuse the situation but believed it to be of no use. So with three armies threatening to invade, the best option is to strike first.
I think this will help you; lookiup the "Just War" theory. St. Augustine was one of first to provide what it means to have a Just War. For example, a just war is fought in the defense of country and allies, Or to protect trade routes and pilgrimages. What is not justified is a war of conquest obviously.