TOKYO — The Japanese government will introduce legislation to keep patents with potential military applications secret, compensating companies …