Both became militaristic, and started expanding their empires. However Japan never developed a total dictatorship like Germany did.
They developed new political ideas by reflecting on the existing political institutions and the relations between the people in a society. They tried to come up with new ways to make things better that were heavily involved in ethics, epistemology, ontology, and a bunch of other philosophical ideas whose origins can be found in ancient philosophical works.
The Qin Dynasty protected against invasion by "<span>d. building a great wall along the border" although it should be noted that strong additions to the military were made as well. </span>