Japan will deploy missiles to its westernmost island near Taiwan within the next five years because of heightened tensions with China.