Movement of Plate Boundaries or volcanic action, building up friction that is eventually realest, that causes sudden and violent shaking of the ground, sometime causing great destruction.
Engineering is when the application of science, mathematics, and technology are used to design and build structures, such as houses, bridges, and skyscrapers.
By making building with flexible materials, strong internal integrity, that are well maintained and up to code, earthquakes will have less impact in Japan.
Setting highly sensitive seismographs all around the island and when any activity over a certain level is detected have everyone evacuate, either by alarms around the island or notifications over the phones.
Make earthquake and tsunami proof shelters all around the island.
Despite the preventative measures there is the factor that Japan is an island. Evacuation for an island would be difficult to get the 127 million people off before the earthquake occurs.