from the Japan Meteorological Agency
There was an interesting story on NPR a few days ago about the development of s seismic early warning system for California. Note that this is not earthquake forecasting or prediction, which might give days to years of warning about the possibility of a quake. Nor is it a tsunami warning system, which can give hours of warning that water waves may arrive across the ocean after an earthquake has already occurred.
Earthquake early warning systems use the travel time of seismic waves (around 5 miles per second!) to give a few seconds of warning before they arrive. So, in Japan, high-speed Shinkansen trains might be automatically slowed. Elevators could be forced to stop at the next floor. Or, upon hearing sirens in the U.S. after the waves were sensed, you might have time to get below your desk. (Brings back memories from my youth of duck and cover drills).
As the article tells us, this effort is probably less effective than good earthquake planning and engineering, but a lot less costly then completely retrofitting San Francisco and Los Angeles.